virajjasani commented on a change in pull request #3198:
URL: https://github.com/apache/hadoop/pull/3198#discussion_r671467241
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/metrics/RpcMetrics.java
##########
@@ -49,7 +51,7 @@
final String name;
final boolean rpcQuantileEnable;
/** The time unit used when storing/accessing time durations. */
- public final static TimeUnit TIMEUNIT = TimeUnit.MILLISECONDS;
+ private static TimeUnit metricsTimeUnit = TimeUnit.MILLISECONDS;
Review comment:
I agree that it would be simpler but some of the consumers e.g
`DecayRpcScheduler`, `RpcScheduler` don't have access to `Server` or
`RpcMetrics` and hence they are able to use metrics timeUnit as static
reference. I tried to see if DecayRpcScheduler can access RpcMetrics object but
it seems difficult because they are independent entities (I might be missing
something though). Any suggestion?
On the other hand, I think having timeUnit static can be advantageous
because all RpcMetrics can follow same timeunit based on core-site config
`rpc.metrics.timeunit`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]