HBASE-11311 Secure Bulk Load does not execute chmod 777 on the files

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

Branch: refs/heads/master
Commit: 20874896623694070443ad06e69c302d169c1446
Parents: 548d506
Author: Matteo Bertozzi <[email protected]>
Authored: Mon Jun 9 22:30:19 2014 +0100
Committer: Matteo Bertozzi <[email protected]>
Committed: Mon Jun 9 22:30:19 2014 +0100

----------------------------------------------------------------------
 .../hadoop/hbase/security/access/SecureBulkLoadEndpoint.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/20874896/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
index 7f9fcc9..07d5bf5 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/SecureBulkLoadEndpoint.java
@@ -250,6 +250,10 @@ public class SecureBulkLoadEndpoint extends 
SecureBulkLoadService
             Configuration conf = env.getConfiguration();
             fs = FileSystem.get(conf);
             for(Pair<byte[], String> el: familyPaths) {
+              Path p = new Path(el.getSecond());
+              LOG.trace("Setting permission for: " + p);
+              fs.setPermission(p, PERM_ALL_ACCESS);
+
               Path stageFamily = new Path(bulkToken, 
Bytes.toString(el.getFirst()));
               if(!fs.exists(stageFamily)) {
                 fs.mkdirs(stageFamily);

Reply via email to