saintstack commented on a change in pull request #657: Hbase 22932 Add rs group 
management methods in Admin and AsyncAdmin
URL: https://github.com/apache/hbase/pull/657#discussion_r328711501
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
 ##########
 @@ -2254,4 +2256,70 @@ boolean snapshotCleanupSwitch(final boolean on, final 
boolean synchronous)
    */
   boolean isSnapshotCleanupEnabled() throws IOException;
 
+  /**
+   * Gets group info for the given group name
+   * @param groupName the group name
+   * @return group info
+   * @throws IOException if a remote or network exception occurs
+   */
+  RSGroupInfo getRSGroupInfo(String groupName) throws IOException;
+
+  /**
+   * Move given set of servers to the specified target RegionServer group
+   * @param servers set of servers to move
+   * @param targetGroup the group to move servers to
+   * @throws IOException if a remote or network exception occurs
+   */
+  void moveServers(Set<Address> servers, String targetGroup) throws 
IOException;
+
+  /**
+   * Creates a new RegionServer group with the given name
+   * @param groupName the name of the group
+   * @throws IOException if a remote or network exception occurs
+   */
+  void addRSGroup(String groupName) throws IOException;
+
+  /**
+   * Removes RegionServer group associated with the given name
+   * @param groupName the group name
+   * @throws IOException if a remote or network exception occurs
+   */
+  void removeRSGroup(String groupName) throws IOException;
+
+  /**
+   * Balance regions in the given RegionServer group
+   * @param groupName the group name
+   * @return boolean Whether balance ran or not
+   * @throws IOException if a remote or network exception occurs
+   */
+  boolean balanceRSGroup(String groupName) throws IOException;
+
+  /**
+   * Lists current set of RegionServer groups
+   * @throws IOException if a remote or network exception occurs
+   */
+  List<RSGroupInfo> listRSGroups() throws IOException;
+
+  /**
+   * Retrieve the RSGroupInfo a server is affiliated to
+   * @param hostPort HostPort to get RSGroupInfo for
+   * @throws IOException if a remote or network exception occurs
+   */
+  RSGroupInfo getRSGroupOfServer(Address hostPort) throws IOException;
+
+  /**
+   * Remove decommissioned servers from group
+   * 1. Sometimes we may find the server aborted due to some hardware failure 
and we must offline
+   * the server for repairing. Or we need to move some servers to join other 
clusters.
+   * So we need to remove these servers from the group.
+   * 2. Dead/recovering/live servers will be disallowed.
+   * @param servers set of servers to remove
+   * @throws IOException if a remote or network exception occurs
+   */
+  void removeServers(Set<Address> servers) throws IOException;
+
+  RSGroupInfo getRSGroupInfoOfTable(TableName tableName) throws IOException;
+
+  void setRSGroupForTables(Set<TableName> tables, String groupName) throws 
IOException;
 
 Review comment:
   ForTables suffix not needed here? You are passing tables and a groupName. It 
is overkill.
   
   Trying to take this opportunity to cleanup API method names.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to