if(ShimLoader.getHadoopShims().isSecurityEnabled() &&
ShimLoader.getHadoopShims().isLoginKeytabBased()) {
//If kerberos security is enabled, and HS2 doAs is enabled,
// then additional params need to be set so that the command is run as
// intended user
SecureCmdDoAs secureDoAs = new SecureCmdDoAs(conf);
secureDoAs.addEnv(variables);
}
env = new String[variables.size()];
int pos = 0;
for (Map.Entry<String, String> entry : variables.entrySet()) {