HBASE-23824 TestSnapshotScannerHDFSAclController is flakey (#1157)
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
cdc98e906c
commit
29a36568b1
|
@ -222,9 +222,9 @@ public class SnapshotScannerHDFSAclController implements MasterCoprocessor, Mast
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postDeleteTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
public void postCompletedDeleteTableAction(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||||
TableName tableName) throws IOException {
|
TableName tableName) throws IOException {
|
||||||
if (needHandleTableHdfsAcl(tableName, "deleteTable " + tableName)) {
|
if (!tableName.isSystemTable() && checkInitialized("deleteTable " + tableName)) {
|
||||||
/*
|
/*
|
||||||
* Remove table user access HDFS acl from namespace directory if the user has no permissions
|
* Remove table user access HDFS acl from namespace directory if the user has no permissions
|
||||||
* of global, ns of the table or other tables of the ns, eg: Bob has 'ns1:t1' read permission,
|
* of global, ns of the table or other tables of the ns, eg: Bob has 'ns1:t1' read permission,
|
||||||
|
@ -235,6 +235,7 @@ public class SnapshotScannerHDFSAclController implements MasterCoprocessor, Mast
|
||||||
try (Table aclTable =
|
try (Table aclTable =
|
||||||
ctx.getEnvironment().getConnection().getTable(PermissionStorage.ACL_TABLE_NAME)) {
|
ctx.getEnvironment().getConnection().getTable(PermissionStorage.ACL_TABLE_NAME)) {
|
||||||
Set<String> users = SnapshotScannerHDFSAclStorage.getTableUsers(aclTable, tableName);
|
Set<String> users = SnapshotScannerHDFSAclStorage.getTableUsers(aclTable, tableName);
|
||||||
|
if (users.size() > 0) {
|
||||||
// 1. Remove table archive directory default ACLs
|
// 1. Remove table archive directory default ACLs
|
||||||
hdfsAclHelper.removeTableDefaultAcl(tableName, users);
|
hdfsAclHelper.removeTableDefaultAcl(tableName, users);
|
||||||
// 2. Delete table owner permission is synced to HDFS in acl table
|
// 2. Delete table owner permission is synced to HDFS in acl table
|
||||||
|
@ -247,6 +248,7 @@ public class SnapshotScannerHDFSAclController implements MasterCoprocessor, Mast
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
public void postModifyTable(ObserverContext<MasterCoprocessorEnvironment> ctx,
|
||||||
|
|
Loading…
Reference in New Issue