[ 
https://issues.apache.org/jira/browse/HBASE-27035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

lujie updated HBASE-27035:
--------------------------
    Description: 
 in SecureBulkLoadManager#secureBulkLoadHFiles, we have code like that:
{code:java}
for(Pair<byte[], String> el: familyPaths) {
              Path stageFamily = new Path(bulkToken, 
Bytes.toString(el.getFirst()));
              if(!fs.exists(stageFamily)) {
                fs.mkdirs(stageFamily);
                fs.setPermission(stageFamily, PERM_ALL_ACCESS);
             }
} {code}
if process crashbefore setpermission, and reboot, we can't setpermission again.

 

we should make this code like 
SnapshotScannerHDFSAclHelper#setCommonDirectoryPermission

 
{code:java}
 for (Path path : paths) {
      createDirIfNotExist(path);
      fs.setPermission(path, new FsPermission(
          conf.get(COMMON_DIRECTORY_PERMISSION, 
COMMON_DIRECTORY_PERMISSION_DEFAULT)))
} {code}
 

 

 

 

 

 

 

 

  was:
 in SecureBulkLoadManager#secureBulkLoadHFiles, we have code like that:
{code:java}
for(Pair<byte[], String> el: familyPaths) {
              Path stageFamily = new Path(bulkToken, 
Bytes.toString(el.getFirst()));
              if(!fs.exists(stageFamily)) {
                fs.mkdirs(stageFamily);
                fs.setPermission(stageFamily, PERM_ALL_ACCESS);
             }
} {code}
if process crashbefore setpermission, and reboot, we can't setpermission again.

 

we should make this code like 
SnapshotScannerHDFSAclHelper#setCommonDirectoryPermission

 
{code:java}
 for (Path path : paths) {
      createDirIfNotExist(path);
      fs.setPermission(path, new FsPermission(
          conf.get(COMMON_DIRECTORY_PERMISSION, 
COMMON_DIRECTORY_PERMISSION_DEFAULT)));
    } {code}
 

 

 

 

 

 

 

 


> failed to set file permission  when node crash
> ----------------------------------------------
>
>                 Key: HBASE-27035
>                 URL: https://issues.apache.org/jira/browse/HBASE-27035
>             Project: HBase
>          Issue Type: Bug
>            Reporter: lujie
>            Priority: Major
>
>  in SecureBulkLoadManager#secureBulkLoadHFiles, we have code like that:
> {code:java}
> for(Pair<byte[], String> el: familyPaths) {
>               Path stageFamily = new Path(bulkToken, 
> Bytes.toString(el.getFirst()));
>               if(!fs.exists(stageFamily)) {
>                 fs.mkdirs(stageFamily);
>                 fs.setPermission(stageFamily, PERM_ALL_ACCESS);
>              }
> } {code}
> if process crashbefore setpermission, and reboot, we can't setpermission 
> again.
>  
> we should make this code like 
> SnapshotScannerHDFSAclHelper#setCommonDirectoryPermission
>  
> {code:java}
>  for (Path path : paths) {
>       createDirIfNotExist(path);
>       fs.setPermission(path, new FsPermission(
>           conf.get(COMMON_DIRECTORY_PERMISSION, 
> COMMON_DIRECTORY_PERMISSION_DEFAULT)))
> } {code}
>  
>  
>  
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to