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

This commit is contained in:
Matteo Bertozzi 2014-06-09 22:30:19 +01:00
parent 548d5061c9
commit 2087489662
1 changed files with 4 additions and 0 deletions

View File

@ -250,6 +250,10 @@ public class SecureBulkLoadEndpoint extends SecureBulkLoadService
Configuration conf = env.getConfiguration(); Configuration conf = env.getConfiguration();
fs = FileSystem.get(conf); fs = FileSystem.get(conf);
for(Pair<byte[], String> el: familyPaths) { 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())); Path stageFamily = new Path(bulkToken, Bytes.toString(el.getFirst()));
if(!fs.exists(stageFamily)) { if(!fs.exists(stageFamily)) {
fs.mkdirs(stageFamily); fs.mkdirs(stageFamily);