diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java index 5b4fd9b..a919079 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java @@ -229,15 +229,17 @@ private ExecBean auxRun(String program, List args, Map e watchdog.checkException(); } catch (Exception ex) { - LOG.error("Command: " + cmd + " failed:", ex); + LOG.error("Command: " + cmd + " failed. res=" + res, ex); } if(watchdog.killedProcess()) { String msg = " was terminated due to timeout(" + timeout + "ms). See " + AppConfig .EXEC_TIMEOUT_NAME + " property"; - LOG.warn("Command: " + cmd + msg); + LOG.warn("Command: " + cmd + msg + " res=" + res); res.stderr += " Command " + msg; } - + if(res.exitcode != 0) { + LOG.info("Command: " + cmd + " failed. res=" + res); + } return res; } diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java index 8966897..8ae61a1 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/SecureProxySupport.java @@ -40,7 +40,7 @@ /** * Helper class to run jobs using Kerberos security. Always safe to - * use these methods, it's a noop if security is not enabled. + * use these methods, it's a no-op if security is not enabled. */ public class SecureProxySupport { private Path tokenPath; @@ -121,9 +121,9 @@ public void addArgs(List args) { if (isEnabled) { args.add("-D"); args.add("hive.metastore.token.signature=" + getHcatServiceStr()); + args.add("-D"); + args.add("proxy.user.name=" + user); } - args.add("-D"); - args.add("proxy.user.name=" + user); } class TokenWrapper { diff --git shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java index b024472..19ba6a8 100644 --- shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java +++ shims/common-secure/src/main/java/org/apache/hadoop/hive/shims/HadoopShimsSecure.java @@ -463,7 +463,7 @@ public void prepareJobOutput(JobConf conf) { @Override public UserGroupInformation getUGIForConf(Configuration conf) throws IOException { - String doAs = conf.get("proxy.user.name"); + String doAs = System.getenv("HADOOP_USER_NAME"); if(doAs != null && doAs.length() > 0) { /* * this allows doAs (proxy user) to be passed along across process boundary where