infraio commented on a change in pull request #2579:
URL: https://github.com/apache/hbase/pull/2579#discussion_r512355359
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -3402,4 +3406,33 @@ public ListReplicationSinkServersResponse
listReplicationSinkServers(
}
return builder.build();
}
+
+ @Override
+ public RegionServerReportResponse replicationServerReport(RpcController
controller,
+ RegionServerReportRequest request) throws ServiceException {
+ try {
+ master.checkServiceStarted();
+ int versionNumber = 0;
+ String version = "0.0.0";
+ VersionInfo versionInfo = VersionInfoUtil.getCurrentClientVersionInfo();
+ if (versionInfo != null) {
+ version = versionInfo.getVersion();
+ versionNumber = VersionInfoUtil.getVersionNumber(versionInfo);
+ }
+ ClusterStatusProtos.ServerLoad sl = request.getLoad();
+ ServerName serverName = ProtobufUtil.toServerName(request.getServer());
+ ServerMetrics oldMetrics =
master.getReplicationServerManager().getServerMetrics(serverName);
+ ServerMetrics newMetrics =
+ ServerMetricsBuilder.toServerMetrics(serverName, versionNumber,
version, sl);
+ master.getReplicationServerManager().serverReport(serverName,
newMetrics);
+ if (sl != null && master.metricsMaster != null) {
+ // Up our metrics.
+ master.metricsMaster.incrementRequests(sl.getTotalNumberOfRequests()
Review comment:
One new question: ReplicationServer should not have request count
metric? Because this metric should mean that read metric or write metric?
----------------------------------------------------------------
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]