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

hive git commit: HIVE-11150 : Remove wrong warning message related to chgrp (Yongzhi Chen via Szehon)

Repository: hive
Updated Branches:
  refs/heads/master cdd1c7bf7 -> 45c741e49


HIVE-11150 : Remove wrong warning message related to chgrp (Yongzhi Chen via Szehon)


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

Branch: refs/heads/master
Commit: 45c741e4971bee7a10e5086508b0cf8328f5fe6c
Parents: cdd1c7b
Author: Szehon Ho <sz...@cloudera.com>
Authored: Thu Jul 2 11:28:24 2015 -0700
Committer: Szehon Ho <sz...@cloudera.com>
Committed: Thu Jul 2 11:29:04 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/45c741e4/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
----------------------------------------------------------------------
diff --git a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
index aa3531c..9eae0ac 100644
--- a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
+++ b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
@@ -714,7 +714,10 @@ public class Hadoop23Shims extends HadoopShimsSecure {
     try {
       FsShell fsShell = new FsShell();
       fsShell.setConf(conf);
-      run(fsShell, new String[]{"-chgrp", "-R", group, target.toString()});
+      //If there is no group of a file, no need to call chgrp
+      if (group != null && !group.isEmpty()) {
+        run(fsShell, new String[]{"-chgrp", "-R", group, target.toString()});
+      }
 
       if (isExtendedAclEnabled(conf)) {
         //Attempt extended Acl operations only if its enabled, 8791but don't fail the operation regardless.