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/04/27 17:16:07 UTC

hive git commit: HIVE-19331: load config in "with" clause not pass to Context.getStagingDir (Daniel Dai, reviewed by Thejas Nair)

Repository: hive
Updated Branches:
  refs/heads/master 477649727 -> 20697513a


HIVE-19331: load config in "with" clause not pass to Context.getStagingDir (Daniel Dai, reviewed by Thejas Nair)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/20697513
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/20697513
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/20697513

Branch: refs/heads/master
Commit: 20697513ae6b22ad09f9936a31aa1c8317809af4
Parents: 4776497
Author: Daniel Dai <da...@gmail.com>
Authored: Fri Apr 27 10:14:30 2018 -0700
Committer: Daniel Dai <da...@gmail.com>
Committed: Fri Apr 27 10:15:39 2018 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/Context.java             | 6 +++++-
 .../hadoop/hive/ql/parse/repl/load/message/TableHandler.java   | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/20697513/ql/src/java/org/apache/hadoop/hive/ql/Context.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Context.java b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
index 70846ac..0fedf0e 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/Context.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/Context.java
@@ -98,7 +98,7 @@ public class Context {
   // Keeps track of scratch directories created for different scheme/authority
   private final Map<String, Path> fsScratchDirs = new HashMap<String, Path>();
 
-  private final Configuration conf;
+  private Configuration conf;
   protected int pathid = 10000;
   protected ExplainConfiguration explainConfig = null;
   protected String cboInfo;
@@ -1067,4 +1067,8 @@ public class Context {
   public void setExecutionIndex(int executionIndex) {
     this.executionIndex = executionIndex;
   }
+
+  public void setConf(HiveConf conf) {
+    this.conf = conf;
+  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/20697513/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/TableHandler.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/TableHandler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/TableHandler.java
index 04a7654..e9b6d3d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/TableHandler.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/TableHandler.java
@@ -32,6 +32,7 @@ public class TableHandler extends AbstractMessageHandler {
     try {
       List<Task<? extends Serializable>> importTasks = new ArrayList<>();
 
+      context.nestedContext.setConf(context.hiveConf);
       EximUtil.SemanticAnalyzerWrapperContext x =
           new EximUtil.SemanticAnalyzerWrapperContext(
               context.hiveConf, context.db, readEntitySet, writeEntitySet, importTasks, context.log,