anmolnar commented on code in PR #8115:
URL: https://github.com/apache/hbase/pull/8115#discussion_r3139879868


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/CoprocessorConfigurationUtil.java:
##########
@@ -46,13 +45,21 @@
 public final class CoprocessorConfigurationUtil {
   private static final Logger LOG = 
LoggerFactory.getLogger(CoprocessorConfigurationUtil.class);
 
+  public static List<String> MASTER_READONLY_CONTROLLER_COPROCESSORS =
+    List.of(MasterReadOnlyController.class.getName());

Review Comment:
   Use `ImmutableMap` and `ImmutableList` please.
   
   ```java
   import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableList;
   import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap;
   
     private static final Map<String, List<String>> RO_COPROCS = 
ImmutableMap.of(
       CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY,  
ImmutableList.of(MasterReadOnlyController.class.getName()), ...
     );
   ```
   
   And the lookup:
   
   ```java
     private static List<String> getReadOnlyCoprocessors(String 
configurationKey) {
       return RO_COPROCS.get(configurationKey);
     }
   ```



-- 
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]

Reply via email to