zhuyaogai commented on code in PR #5228: URL: https://github.com/apache/hbase/pull/5228#discussion_r1292678337
########## hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java: ########## @@ -732,6 +770,32 @@ public void updateRpc(MethodDescriptor method, Message param, CallStats stats, T updateRpcGeneric(methodName, stats); } + /** Report table rpc context to metrics system. */ + private void updateTableMetric(String methodName, String tableName, CallStats stats, + Throwable e) { + if ( + conf.getBoolean(CLIENT_SIDE_TABLE_METRICS_ENABLED_KEY, false) && methodName != null + && tableName != null + ) { + String metricKey = methodName + "_" + tableName; + updateRpcGeneric(metricKey, stats); + if (e != null) { + getMetric(FAILURE_CNT_BASE + metricKey, rpcCounters, counterFactory).inc(); + } + } + } + + /** Parse table from region. */ + private String parseTableName(HBaseProtos.RegionSpecifier regionSpecifier, Message param) { + if (regionSpecifier == null || StringUtils.isEmpty(regionSpecifier.getValue().toStringUtf8())) { Review Comment: done. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org