You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/10/02 20:12:05 UTC

hive git commit: HIVE-11990 : Loading data inpath from a temporary table dir fails on Windows (Hari Subramaniyan, reviewed by Jason Dere)

Repository: hive
Updated Branches:
  refs/heads/master a1bac802a -> c3d62ad94


HIVE-11990 : Loading data inpath from a temporary table dir fails on Windows (Hari Subramaniyan, reviewed by Jason Dere)


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

Branch: refs/heads/master
Commit: c3d62ad94be5bf896d3e868b39f472ff6b1ce992
Parents: a1bac80
Author: Hari Subramaniyan <ha...@apache.org>
Authored: Fri Oct 2 11:11:46 2015 -0700
Committer: Hari Subramaniyan <ha...@apache.org>
Committed: Fri Oct 2 11:11:46 2015 -0700

----------------------------------------------------------------------
 .../hadoop/hive/ql/parse/LoadSemanticAnalyzer.java  | 12 ------------
 .../queries/clientpositive/load_non_hdfs_path.q     |  6 ++++++
 .../results/clientpositive/load_non_hdfs_path.q.out | 16 ++++++++++++++++
 3 files changed, 22 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c3d62ad9/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
index 9d2702f..c488029 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/LoadSemanticAnalyzer.java
@@ -159,18 +159,6 @@ public class LoadSemanticAnalyzer extends BaseSemanticAnalyzer {
       throw new SemanticException(ErrorMsg.INVALID_PATH.getMsg(ast), e);
     }
 
-    // only in 'local' mode do we copy stuff from one place to another.
-    // reject different scheme/authority in other cases.
-    if (!isLocal
-        && (!StringUtils.equals(fromURI.getScheme(), toURI.getScheme()) || !StringUtils
-        .equals(fromURI.getAuthority(), toURI.getAuthority()))) {
-      String reason = "Move from: " + fromURI.toString() + " to: "
-          + toURI.toString() + " is not valid. "
-          + "Please check that values for params \"default.fs.name\" and "
-          + "\"hive.metastore.warehouse.dir\" do not conflict.";
-      throw new SemanticException(ErrorMsg.ILLEGAL_PATH.getMsg(ast, reason));
-    }
-
     return srcs;
   }
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c3d62ad9/ql/src/test/queries/clientpositive/load_non_hdfs_path.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/load_non_hdfs_path.q b/ql/src/test/queries/clientpositive/load_non_hdfs_path.q
new file mode 100644
index 0000000..824ce69
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/load_non_hdfs_path.q
@@ -0,0 +1,6 @@
+dfs ${system:test.dfs.mkdir} ${system:test.tmp.dir}/non_hdfs_path;
+dfs -touchz ${system:test.tmp.dir}/non_hdfs_path/1.txt;
+dfs -chmod 555 ${system:test.tmp.dir}/non_hdfs_path/1.txt;
+
+create table t1(i int);
+load data inpath 'pfile:${system:test.tmp.dir}/non_hdfs_path/' overwrite into table t1;

http://git-wip-us.apache.org/repos/asf/hive/blob/c3d62ad9/ql/src/test/results/clientpositive/load_non_hdfs_path.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/load_non_hdfs_path.q.out b/ql/src/test/results/clientpositive/load_non_hdfs_path.q.out
new file mode 100644
index 0000000..31c40d8
--- /dev/null
+++ b/ql/src/test/results/clientpositive/load_non_hdfs_path.q.out
@@ -0,0 +1,16 @@
+PREHOOK: query: create table t1(i int)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@t1
+POSTHOOK: query: create table t1(i int)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@t1
+#### A masked pattern was here ####
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@t1
+#### A masked pattern was here ####
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@t1