bharathv commented on a change in pull request #3566:
URL: https://github.com/apache/hbase/pull/3566#discussion_r684493515



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -3046,13 +3044,18 @@ public GetMastersResponse getMasters(RpcController 
rpcController, GetMastersRequ
   }
 
   @Override
-  public GetBootstrapNodesResponse getBootstrapNodes(RpcController controller,
-    GetBootstrapNodesRequest request) throws ServiceException {
-    GetBootstrapNodesResponse.Builder builder = 
GetBootstrapNodesResponse.newBuilder();
-    for (ServerName sn : 
master.getServerManager().getOnlineServers().keySet()) {
-      builder.addServerName(ProtobufUtil.toServerName(sn));
+  protected List<ServerName> getRegionServers() {
+    return master.getServerManager().getOnlineServersList();
+  }
+
+  @Override
+  protected List<ServerName> getMasters() {
+    List<ServerName> list = new ArrayList<>();
+    master.getActiveMaster().ifPresent(list::add);
+    for (ServerName backupMaster : master.getBackupMasters()) {

Review comment:
       nit: list.addAll(getBackupMasters());

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
##########
@@ -308,18 +310,35 @@
    */
   private static final long 
DEFAULT_REGION_SERVER_RPC_MINIMUM_SCAN_TIME_LIMIT_DELTA = 10;
 
-  /*
+  /**
    * Whether to reject rows with size > threshold defined by
    * {@link RSRpcServices#BATCH_ROWS_THRESHOLD_NAME}
    */
   private static final String REJECT_BATCH_ROWS_OVER_THRESHOLD =
     "hbase.rpc.rows.size.threshold.reject";
 
-  /*
+  /**
    * Default value of config {@link 
RSRpcServices#REJECT_BATCH_ROWS_OVER_THRESHOLD}
    */
   private static final boolean DEFAULT_REJECT_BATCH_ROWS_OVER_THRESHOLD = 
false;
 
+  /**
+   * Determine the bootstrap nodes we want to return to the client connection 
registry.
+   * <ul>
+   * <li>{@link #MASTER}: return masters as bootstrap nodes.</li>

Review comment:
       Why do we even need this? I thought the agreement was to not let master 
be in the hot path? For backward compatibility sakes?




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