hive git commit: HIVE-19249: Replication: WITH clause is not passing the configuration to Task correctly in all cases (Vaibhav Gumashta reviewed by Thejas Nair, Daniel Dai)

2018-04-20 Thread vgumashta
Repository: hive
Updated Branches:
  refs/heads/branch-3 caafbf403 -> ae700b0b1


HIVE-19249: Replication: WITH clause is not passing the configuration to Task 
correctly in all cases (Vaibhav Gumashta reviewed by Thejas Nair, Daniel Dai)


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

Branch: refs/heads/branch-3
Commit: ae700b0b18eac7aa37ff659179b5d5bd3bba30a7
Parents: caafbf4
Author: Vaibhav Gumashta 
Authored: Fri Apr 20 11:28:41 2018 -0700
Committer: Vaibhav Gumashta 
Committed: Fri Apr 20 11:37:02 2018 -0700

--
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/ae700b0b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
--
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 
b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index 009a890..49c355b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -2299,7 +2299,6 @@ private void constructOneLBLocationMap(FileStatus fSta,
 assert tbl.getPath() != null : "null==getPath() for " + tbl.getTableName();
 boolean isMmTable = AcidUtils.isInsertOnlyTable(tbl);
 boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl);
-HiveConf sessionConf = SessionState.getSessionConf();
 if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
   newFiles = Collections.synchronizedList(new ArrayList());
 }
@@ -2341,11 +2340,11 @@ private void constructOneLBLocationMap(FileStatus fSta,
 boolean isAutopurge = 
"true".equalsIgnoreCase(tbl.getProperty("auto.purge"));
 // TODO: this should never run for MM tables anymore. Remove the flag, 
and maybe the filter?
 replaceFiles(tblPath, loadPath, destPath, tblPath,
-sessionConf, isSrcLocal, isAutopurge, newFiles, filter, 
isMmTable?true:false, !tbl.isTemporary());
+conf, isSrcLocal, isAutopurge, newFiles, filter, 
isMmTable?true:false, !tbl.isTemporary());
   } else {
 try {
-  FileSystem fs = tbl.getDataLocation().getFileSystem(sessionConf);
-  copyFiles(sessionConf, loadPath, destPath, fs, isSrcLocal, 
isAcidIUDoperation,
+  FileSystem fs = tbl.getDataLocation().getFileSystem(conf);
+  copyFiles(conf, loadPath, destPath, fs, isSrcLocal, 
isAcidIUDoperation,
 loadFileType == LoadFileType.OVERWRITE_EXISTING, newFiles,
   tbl.getNumBuckets() > 0 ? true : false, isFullAcidTable);
 } catch (IOException e) {



hive git commit: HIVE-19249: Replication: WITH clause is not passing the configuration to Task correctly in all cases (Vaibhav Gumashta reviewed by Thejas Nair, Daniel Dai)

2018-04-20 Thread vgumashta
Repository: hive
Updated Branches:
  refs/heads/master 9cfaf6b00 -> 77afeb2d8


HIVE-19249: Replication: WITH clause is not passing the configuration to Task 
correctly in all cases (Vaibhav Gumashta reviewed by Thejas Nair, Daniel Dai)


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

Branch: refs/heads/master
Commit: 77afeb2d80a8534a40061e7fd45cde42156d
Parents: 9cfaf6b
Author: Vaibhav Gumashta 
Authored: Fri Apr 20 11:28:41 2018 -0700
Committer: Vaibhav Gumashta 
Committed: Fri Apr 20 11:36:33 2018 -0700

--
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/77afeb2d/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
--
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 
b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index 009a890..49c355b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -2299,7 +2299,6 @@ private void constructOneLBLocationMap(FileStatus fSta,
 assert tbl.getPath() != null : "null==getPath() for " + tbl.getTableName();
 boolean isMmTable = AcidUtils.isInsertOnlyTable(tbl);
 boolean isFullAcidTable = AcidUtils.isFullAcidTable(tbl);
-HiveConf sessionConf = SessionState.getSessionConf();
 if (conf.getBoolVar(ConfVars.FIRE_EVENTS_FOR_DML) && !tbl.isTemporary()) {
   newFiles = Collections.synchronizedList(new ArrayList());
 }
@@ -2341,11 +2340,11 @@ private void constructOneLBLocationMap(FileStatus fSta,
 boolean isAutopurge = 
"true".equalsIgnoreCase(tbl.getProperty("auto.purge"));
 // TODO: this should never run for MM tables anymore. Remove the flag, 
and maybe the filter?
 replaceFiles(tblPath, loadPath, destPath, tblPath,
-sessionConf, isSrcLocal, isAutopurge, newFiles, filter, 
isMmTable?true:false, !tbl.isTemporary());
+conf, isSrcLocal, isAutopurge, newFiles, filter, 
isMmTable?true:false, !tbl.isTemporary());
   } else {
 try {
-  FileSystem fs = tbl.getDataLocation().getFileSystem(sessionConf);
-  copyFiles(sessionConf, loadPath, destPath, fs, isSrcLocal, 
isAcidIUDoperation,
+  FileSystem fs = tbl.getDataLocation().getFileSystem(conf);
+  copyFiles(conf, loadPath, destPath, fs, isSrcLocal, 
isAcidIUDoperation,
 loadFileType == LoadFileType.OVERWRITE_EXISTING, newFiles,
   tbl.getNumBuckets() > 0 ? true : false, isFullAcidTable);
 } catch (IOException e) {