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/09/18 19:11:08 UTC

hive git commit: HIVE-11695 : If user have no permission to create LOCAL DIRECTORY ,the Hql does not throw any exception and fail silently. (WangMeng via Ashutosh Chauhan)

Repository: hive
Updated Branches:
  refs/heads/master c7de9b9f5 -> b934a804a


HIVE-11695 : If user have no permission to  create LOCAL DIRECTORY ,the Hql does not throw any exception and fail silently. (WangMeng via Ashutosh Chauhan)

Signed-off-by: Ashutosh Chauhan <ha...@apache.org>


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

Branch: refs/heads/master
Commit: b934a804a75b7e01cf5ff043db4cc54c82d91641
Parents: c7de9b9
Author: WangMeng <me...@qiyi.com>
Authored: Wed Sep 16 21:00:00 2015 -0800
Committer: Ashutosh Chauhan <ha...@apache.org>
Committed: Fri Sep 18 10:10:47 2015 -0700

----------------------------------------------------------------------
 ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/b934a804/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
index 6a19cc3..7e257e5 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java
@@ -132,7 +132,10 @@ public class MoveTask extends Task<MoveWork> implements Serializable {
           try {
             // create the destination if it does not exist
             if (!dstFs.exists(targetPath)) {
-              FileUtils.mkdir(dstFs, targetPath, false, conf);
+              if (!FileUtils.mkdir(dstFs, targetPath, false, conf)) {
+                throw new HiveException(
+                    "Failed to create local target directory for copy:" + targetPath);
+              }
             }
           } catch (IOException e) {
             throw new HiveException("Unable to create target directory for copy" + targetPath, e);