HADOOP-14893. WritableRpcEngine should use Time.monotonicNow. Contributed by Chetna Chaudhari.
(cherry picked from commit d08b8c801a
)
This commit is contained in:
parent
179d8dc83c
commit
b017af2391
|
@ -233,7 +233,7 @@ public class WritableRpcEngine implements RpcEngine {
|
||||||
throws Throwable {
|
throws Throwable {
|
||||||
long startTime = 0;
|
long startTime = 0;
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
startTime = Time.now();
|
startTime = Time.monotonicNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if Tracing is on then start a new span for this rpc.
|
// if Tracing is on then start a new span for this rpc.
|
||||||
|
@ -253,7 +253,7 @@ public class WritableRpcEngine implements RpcEngine {
|
||||||
if (traceScope != null) traceScope.close();
|
if (traceScope != null) traceScope.close();
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled()) {
|
||||||
long callTime = Time.now() - startTime;
|
long callTime = Time.monotonicNow() - startTime;
|
||||||
LOG.debug("Call: " + method.getName() + " " + callTime);
|
LOG.debug("Call: " + method.getName() + " " + callTime);
|
||||||
}
|
}
|
||||||
return value.get();
|
return value.get();
|
||||||
|
|
Loading…
Reference in New Issue