|
@@ -73,6 +73,7 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
|
|
/** Thread pool for logging stats. */
|
|
/** Thread pool for logging stats. */
|
|
private ExecutorService executor;
|
|
private ExecutorService executor;
|
|
|
|
|
|
|
|
+ public static final String CONCURRENT = "concurrent";
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void init(Configuration configuration, RouterRpcServer rpcServer,
|
|
public void init(Configuration configuration, RouterRpcServer rpcServer,
|
|
@@ -85,10 +86,13 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
|
|
// Create metrics
|
|
// Create metrics
|
|
this.metrics = FederationRPCMetrics.create(conf, server);
|
|
this.metrics = FederationRPCMetrics.create(conf, server);
|
|
for (String nameservice : FederationUtil.getAllConfiguredNS(conf)) {
|
|
for (String nameservice : FederationUtil.getAllConfiguredNS(conf)) {
|
|
- LOG.info("Create Nameservice RPC Metrics for " + nameservice);
|
|
|
|
|
|
+ LOG.info("Create Nameservice RPC Metrics for {}", nameservice);
|
|
this.nameserviceRPCMetricsMap.computeIfAbsent(nameservice,
|
|
this.nameserviceRPCMetricsMap.computeIfAbsent(nameservice,
|
|
k -> NameserviceRPCMetrics.create(conf, k));
|
|
k -> NameserviceRPCMetrics.create(conf, k));
|
|
}
|
|
}
|
|
|
|
+ LOG.info("Create Nameservice RPC Metrics for {}", CONCURRENT);
|
|
|
|
+ this.nameserviceRPCMetricsMap.computeIfAbsent(CONCURRENT,
|
|
|
|
+ k -> NameserviceRPCMetrics.create(conf, k));
|
|
|
|
|
|
// Create thread pool
|
|
// Create thread pool
|
|
ThreadFactory threadFactory = new ThreadFactoryBuilder()
|
|
ThreadFactory threadFactory = new ThreadFactoryBuilder()
|
|
@@ -153,7 +157,7 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
|
|
if (success) {
|
|
if (success) {
|
|
long proxyTime = getProxyTime();
|
|
long proxyTime = getProxyTime();
|
|
if (proxyTime >= 0) {
|
|
if (proxyTime >= 0) {
|
|
- if (metrics != null) {
|
|
|
|
|
|
+ if (metrics != null && !CONCURRENT.equals(nsId)) {
|
|
metrics.addProxyTime(proxyTime, state);
|
|
metrics.addProxyTime(proxyTime, state);
|
|
}
|
|
}
|
|
if (nameserviceRPCMetricsMap != null &&
|
|
if (nameserviceRPCMetricsMap != null &&
|