diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java index 19f688672f..8ad55fe97e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java @@ -51,6 +51,7 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.hive.common.util.HiveStringUtils; import org.apache.tez.mapreduce.common.MRInputSplitDistributor; import org.apache.tez.mapreduce.hadoop.InputSplitInfo; import org.apache.tez.mapreduce.output.MROutput; @@ -1093,7 +1094,8 @@ private void addHdfsResource(Configuration conf, List tmpResource String addedFiles = Utilities.getLocalResourceFiles(conf, SessionState.ResourceType.FILE); String addedJars = Utilities.getLocalResourceFiles(conf, SessionState.ResourceType.JAR); String auxJars = HiveConf.getVar(conf, HiveConf.ConfVars.HIVEAUXJARS); - String allFiles = auxJars + "," + addedJars + "," + addedFiles; + String reloadableAuxJars = SessionState.get() == null ? null : SessionState.get().getReloadableAuxJars(); + String allFiles = HiveStringUtils.joinIgnoringEmpty(new String[]{auxJars, reloadableAuxJars, addedJars, addedFiles}, ','); return allFiles.split(","); } @@ -1110,10 +1112,11 @@ private void addHdfsResource(Configuration conf, List tmpResource HiveConf.setVar(conf, ConfVars.HIVEADDEDJARS, addedJars); } String auxJars = HiveConf.getVar(conf, HiveConf.ConfVars.HIVEAUXJARS); + String reloadableAuxJars = SessionState.get() == null ? null : SessionState.get().getReloadableAuxJars(); // need to localize the additional jars and files // we need the directory on hdfs to which we shall put all these files - String allFiles = auxJars + "," + addedJars + "," + addedFiles; + String allFiles = HiveStringUtils.joinIgnoringEmpty(new String[]{auxJars, reloadableAuxJars, addedJars, addedFiles}, ','); return allFiles.split(","); }