apurtell commented on a change in pull request #781: HBASE-18095: Zookeeper-less client connection implementation URL: https://github.com/apache/hbase/pull/781#discussion_r342210399
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java ########## @@ -977,6 +986,53 @@ public GetClusterStatusResponse getClusterStatus(RpcController controller, return response.build(); } + @Override + public GetMetaLocationsResponse getMetaLocations( + RpcController controller, GetMetaLocationsRequest req) throws ServiceException { + GetMetaLocationsResponse.Builder response = GetMetaLocationsResponse.newBuilder(); + try { + // We skip the master init check since this RPC is served on both the active and standby + // masters as long as their cache is populated. + response.addAllLocations(master.getMetaRegionLocationCache().getCachedMetaRegionLocations()); + } catch (MetaRegionsNotAvailableException e) { + throw new ServiceException(e); + } + return response.build(); + } + + @Override + public IsActiveResponse isActive(RpcController controller, IsActiveRequest req) + throws ServiceException { + IsActiveResponse.Builder response = IsActiveResponse.newBuilder(); + response.setIsMasterActive(master.isActiveMaster()); + response.setStartCode(master.getStartcode()); + return response.build(); + } + + @Override + public GetPortInfoResponse getPortInfo(RpcController controller, GetPortInfoRequest req) + throws ServiceException { + GetPortInfoResponse.Builder response = GetPortInfoResponse.newBuilder(); + response.setMasterPort( + master.getConfiguration().getInt(HConstants.MASTER_PORT, HConstants.DEFAULT_MASTER_PORT)); + response.setInfoPort(master.getConfiguration().getInt(HConstants.MASTER_INFO_PORT, + HConstants.DEFAULT_MASTER_INFOPORT)); + return response.build(); + } + + @Override + public GetClusterIdResponse getClusterId(RpcController controller, GetClusterIdRequest req) + throws ServiceException { + GetClusterIdResponse.Builder response = GetClusterIdResponse.newBuilder(); + try { + master.checkInitialized(); Review comment: See my above comment. Initialize just this bit of info from HDFS if needed. Does not require active role. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services