> On April 18, 2014, 5:13 a.m., Xuefu Zhang wrote: > > common/src/java/org/apache/hadoop/hive/common/FileUtils.java, line 509 > > <https://reviews.apache.org/r/20435/diff/1/?file=561429#file561429line509> > > > > 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.
Yea I did see that. If there's not much advantage of one over another, I would prefer using the shell for simplicity as boils down to using a recursive call like you said. That way code is simpler, and there's already some precedents to use the Shell in other Hive code. What do you think, or do you see some advantage of using the API way? - Szehon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20435/#review40742 ----------------------------------------------------------- On April 18, 2014, 6:33 p.m., Szehon Ho wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20435/ > ----------------------------------------------------------- > > (Updated April 18, 2014, 6:33 p.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 > >