You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by da...@apache.org on 2018/06/16 05:49:02 UTC

hive git commit: HIVE-19810: StorageHandler fail to ship jars in Tez intermittently (Daniel Dai, reviewed by Sergey Shelukhin)

Repository: hive
Updated Branches:
  refs/heads/branch-3 fb1e5ba7a -> 89f515193


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/89f51519
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/89f51519
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/89f51519

Branch: refs/heads/branch-3
Commit: 89f5151931e9113db8c9ff5b9b763a6845f9b29f
Parents: fb1e5ba
Author: Daniel Dai <da...@gmail.com>
Authored: Fri Jun 15 22:48:30 2018 -0700
Committer: Daniel Dai <da...@gmail.com>
Committed: Fri Jun 15 22:48:30 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/89f51519/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());
       }
     }