You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/06/21 09:53:55 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #1782: HBASE-24431 RSGroupInfo add configuration map to store something extra

Apache9 commented on a change in pull request #1782:
URL: https://github.com/apache/hbase/pull/1782#discussion_r443202531



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
##########
@@ -114,6 +121,34 @@ public boolean removeServer(Address hostPort) {
     return servers.remove(hostPort);
   }
 
+  /**
+   * Getter for fetching an unmodifiable {@link #configuration} map.
+   */
+  public Map<String, String> getConfiguration() {
+    // shallow pointer copy
+    return Collections.unmodifiableMap(configuration);
+  }
+
+  /**
+   * Setter for storing a configuration setting in {@link #configuration} map.
+   * @param key Config key.
+   * @param value String value. If null, removes the setting.
+   */
+  public void setConfiguration(String key, String value) {

Review comment:
       We have a removeConfiguration so let's not allow null value here?

##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java
##########
@@ -46,6 +49,8 @@
   @Deprecated
   private final SortedSet<TableName> tables;
 
+  private Map<String, String> configuration;

Review comment:
       final?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org