----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20435/#review40742 -----------------------------------------------------------
common/src/java/org/apache/hadoop/hive/common/FileUtils.java <https://reviews.apache.org/r/20435/#comment73883> dstFS.getFileStatus(dst) is called twice here. We should be able to reduce to one. common/src/java/org/apache/hadoop/hive/common/FileUtils.java <https://reviews.apache.org/r/20435/#comment73884> I saw FileSystem.setPermission(Path, FsPermission), which might be what you're looking for. If recursion is the concern, it's probably not too hard to write a util method to do that. In fact you may even be able to find the code from FsShell.java. Just for your consideration. - Xuefu Zhang On April 17, 2014, 4:58 a.m., Szehon Ho wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20435/ > ----------------------------------------------------------- > > (Updated April 17, 2014, 4:58 a.m.) > > > Review request for hive and Brock Noland. > > > Bugs: HIVE-6916 > https://issues.apache.org/jira/browse/HIVE-6916 > > > Repository: hive-git > > > Description > ------- > > This fixes the CopyTask (used by export/import) to also do the permission > inheritance semantics, if the flag is on. Like elsewhere in the code, this > is using the HDFS shell because it allows specification of recursion (whereas > I could not find it in the HDFS-API). > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/common/FileUtils.java b36a016 > > itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestFolderPermissions.java > a635bb0 > ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java b429a58 > > Diff: https://reviews.apache.org/r/20435/diff/ > > > Testing > ------- > > Added a unit test for the same. > > > Thanks, > > Szehon Ho > >