mneethiraj commented on code in PR #417:
URL: https://github.com/apache/ranger/pull/417#discussion_r1870412116
##########
hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java:
##########
@@ -90,19 +91,28 @@ public class RangerAuthorizationCoprocessor implements
AccessControlService.Inte
private static final String GROUP_PREFIX = "@";
private UserProvider userProvider;
- private RegionCoprocessorEnvironment regionEnv;
+ private RegionCoprocessorEnvironment regionEnv;
private Map<InternalScanner, String> scannerOwners = new
MapMaker().weakKeys().makeMap();
/** if we should check EXEC permissions */
private boolean shouldCheckExecPermission;
-
+
/*
* These are package level only for testability and aren't meant to be
exposed outside via getters/setters or made available to derived classes.
*/
final HbaseFactory _factory = HbaseFactory.getInstance();
final HbaseUserUtils _userUtils = _factory.getUserUtils();
final HbaseAuthUtils _authUtils = _factory.getAuthUtils();
private static volatile RangerHBasePlugin hbasePlugin = null;
-
+
+ public void setColumnAuthOptimizationEnabled(boolean enable) throws
Exception {
+ if (hbasePlugin!=null) {
Review Comment:
hbasePlugin is a static volatile member, whose value could change between if
at line 108 and referencing at line 109. Hence copying to a local variable is a
safe practice.
--
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]