Apache9 commented on code in PR #8880:
URL: https://github.com/apache/hbase/pull/8880#discussion_r4574250636
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java:
##########
@@ -280,11 +279,11 @@ private void updateACL(RegionCoprocessorEnvironment e,
final Map<byte[], List<Ce
// to and fro conversion overhead. get req is converted to PB req
// and results are converted to PB results 1st and then to POJOs
// again. We could have avoided such at least in ACL table context..
- try (Table t =
e.getConnection().getTable(PermissionStorage.ACL_TABLE_NAME)) {
+ try {
for (byte[] entry : entries) {
currentEntry = entry;
ListMultimap<String, UserPermission> perms =
- PermissionStorage.getPermissions(conf, entry, t, null, null, null,
false);
+ PermissionStorage.getPermissions(e.getConnection(), entry);
byte[] serialized = PermissionStorage.writePermissionsAsBytes(perms,
conf);
zkPermissionWatcher.writeToZookeeper(entry, serialized);
}
Review Comment:
Creating a new Table is very lightweighted operation, so should not be a big
problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]