virajjasani commented on a change in pull request #754: HBASE-22978 : Online 
slow response log
URL: https://github.com/apache/hbase/pull/754#discussion_r371633649
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
 ##########
 @@ -1251,6 +1258,9 @@ public RSRpcServices(final HRegionServer rs) throws 
IOException {
     ConnectionUtils.setServerSideHConnectionRetriesConfig(conf, name, LOG);
     rpcServer = createRpcServer(rs, rpcSchedulerFactory, bindAddress, name);
     rpcServer.setRsRpcServices(this);
+    if (!(rs instanceof HMaster)) {
+      rpcServer.setOnlineSlowLogProvider(rs.getOnlineSlowLogProvider());
 
 Review comment:
   Well this is the main logic, RSRpcService is the one that should know this 
better regardless of whether we instantiate OnlineSlowLog in HMaster.
   The one in HRegionServer class just initializes OnlineSlowLog only in 
HRegionServer and not in HMaster. But even if it does, then this if condition 
in RSRpcServices will ensure we set the expected instance of OnlineSlowLog in 
rpcServer since it is rpcServer that is going to use it.

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