@Override
  protected ShellCommandUtil.Result executeCommand(String[] command, Map<String, String> envp, ShellCommandUtil.InteractiveHandler interactiveHandler)
      throws KerberosOperationException {

    Map<String, String> _envp;

    if (MapUtils.isEmpty(environmentMap)) {
      _envp = envp;
    } else if (MapUtils.isEmpty(envp)) {
      _envp = environmentMap;
    } else {
      _envp = new HashMap<>();
      _envp.putAll(envp);
      _envp.putAll(environmentMap);
    }

    return super.executeCommand(command, _envp, interactiveHandler);
  }
Executes a shell command in a credentials context
<p/>
See {@link ShellCommandUtil#runCommand(String[])}
<p>
This implementation sets the proper environment for the custom <code>KRB5CCNAME </code> value.

@param command            an array of String value representing the command and its arguments
@param envp               a map of string, string of environment variables
@param interactiveHandler a handler to provide responses to queries from the command,
                          or null if no queries are expected
@return a ShellCommandUtil.Result declaring the result of the operation
@throws KerberosOperationException
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KDCKerberosOperationHandler.java