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 aa3531c8cf28d6b877630cf9a05e1b305ee5a34e..9eae0ac1e21da675d348ed8f93739b2e6196aabf 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 void setFullFileStatus(Configuration conf, HdfsFileStatus sourceStatus, 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.