-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20145/
-----------------------------------------------------------

Review request for hive.


Repository: hive-git


Description
-------

Hive.copyFiles behaves correctly for subdirectory permission-inheritance only 
in case of one-level insert.

To handle static partition (or any multi-directory case), I keep track of the 
permission of the first existing parent, and then apply it the entire sub-tree. 
 Had to do this manually, as FileSystem.mkdir(child, perm) will only apply perm 
on the child itself, and not on other intermediate parents created.


Diffs
-----

  
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/TestFolderPermissions.java
 PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java e6cb70f 

Diff: https://reviews.apache.org/r/20145/diff/


Testing
-------

Fortunately, copyFiles uses the same code for hdfs/local case, so I was able to 
write a unit test to reproduce the issue.

Tried to write a qfile test but did not work as 'dfs -ls' output is masked and 
cannot be compared, so ended up writing a junit test.


Thanks,

Szehon Ho

Reply via email to