Repository: hive Updated Branches: refs/heads/master 97da974fa -> 5ba634aa6
HIVE-19810: StorageHandler fail to ship jars in Tez intermittently (Daniel Dai, reviewed by Sergey Shelukhin) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/5ba634aa Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/5ba634aa Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/5ba634aa Branch: refs/heads/master Commit: 5ba634aa665416743d2f63cbb12f601fe408fe9a Parents: 97da974 Author: Daniel Dai <dai...@gmail.com> Authored: Fri Jun 15 22:49:23 2018 -0700 Committer: Daniel Dai <dai...@gmail.com> Committed: Fri Jun 15 22:49:23 2018 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hive/ql/exec/tez/TezSessionState.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/5ba634aa/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java index b13f73b..fe139c9 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java @@ -132,7 +132,7 @@ public class TezSessionState { } /** A directory that will contain resources related to DAGs and specified in configs. */ public final Path dagResourcesDir; - public final Set<String> additionalFilesNotFromConf = new HashSet<>(); + public final Map<String, LocalResource> additionalFilesNotFromConf = new HashMap<String, LocalResource>(); /** Localized resources of this session; both from conf and not from conf (above). */ public final Set<LocalResource> localizedResources = new HashSet<>(); @@ -595,7 +595,7 @@ public class TezSessionState { boolean hasResources = !resources.additionalFilesNotFromConf.isEmpty(); if (hasResources) { for (String s : newFilesNotFromConf) { - hasResources = resources.additionalFilesNotFromConf.contains(s); + hasResources = resources.additionalFilesNotFromConf.keySet().contains(s); if (!hasResources) { break; } @@ -607,9 +607,11 @@ public class TezSessionState { if (newResources != null) { resources.localizedResources.addAll(newResources); } - for (String fullName : newFilesNotFromConf) { - resources.additionalFilesNotFromConf.add(fullName); + for (int i=0;i<newFilesNotFromConf.length;i++) { + resources.additionalFilesNotFromConf.put(newFilesNotFromConf[i], newResources.get(i)); } + } else { + resources.localizedResources.addAll(resources.additionalFilesNotFromConf.values()); } }