ndimiduk commented on a change in pull request #754: HBASE-22978 : Online slow
response log
URL: https://github.com/apache/hbase/pull/754#discussion_r371458194
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
##########
@@ -3818,6 +3828,40 @@ public ExecuteProceduresResponse
executeProcedures(RpcController controller,
}
}
+ @Override
+ @QosPriority(priority = HConstants.ADMIN_QOS)
+ public SlowLogResponses getSlowLogResponses(final RpcController controller,
+ final SlowLogResponseRequest request) throws ServiceException {
+ final OnlineSlowLogProvider onlineSlowLogProvider =
+ this.regionServer.getOnlineSlowLogProvider();
+ List<SlowLogPayload> slowLogPayloads;
+ if (onlineSlowLogProvider != null) {
+ slowLogPayloads = onlineSlowLogProvider.getSlowLogPayloads();
+ } else {
+ slowLogPayloads = new ArrayList<>();
Review comment:
Use `Collections.emptyList()` and avoid the allocation.
----------------------------------------------------------------
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