You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by xk...@apache.org on 2019/12/03 22:20:25 UTC
[hadoop] branch branch-2.10 updated: HADOOP-16700. Track response
time separately in Server.Call to avoid negative RpcQueueTime values.
Contributed by xuzq.
This is an automated email from the ASF dual-hosted git repository.
xkrogen pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new bada9d7 HADOOP-16700. Track response time separately in Server.Call to avoid negative RpcQueueTime values. Contributed by xuzq.
bada9d7 is described below
commit bada9d7f6fa16bf065fc3d892cd9b32e243e3696
Author: Erik Krogen <xk...@apache.org>
AuthorDate: Wed Nov 20 07:56:33 2019 -0800
HADOOP-16700. Track response time separately in Server.Call to avoid negative RpcQueueTime values. Contributed by xuzq.
(cherry picked from be77231452baee2c3dd68f7c0991411cae2eea1b)
(cherry picked from c1ed2474595c672d95237c42a6e2a51913f14d25)
(cherry picked from 23f25418e822f90aa6bd0daa0ba65ab548b05eb1)
(cherry picked from 39daae6658fb270d6c8d156602d53ef74f119624)
---
.../src/main/java/org/apache/hadoop/ipc/Server.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
index f598c08..b7cc6ab 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java
@@ -738,8 +738,8 @@ public abstract class Server {
private volatile String detailedMetricsName = "";
final int callId; // the client's call id
final int retryCount; // the retry count of the call
- long timestampNanos; // time received when response is null
- // time served when response is not null
+ long timestampNanos; // time the call was received
+ long responseTimestampNanos; // time the call was served
private AtomicInteger responseWaitCount = new AtomicInteger(1);
final RPC.RpcKind rpcKind;
final byte[] clientId;
@@ -776,6 +776,7 @@ public abstract class Server {
this.callId = id;
this.retryCount = retryCount;
this.timestampNanos = Time.monotonicNowNanos();
+ this.responseTimestampNanos = timestampNanos;
this.rpcKind = kind;
this.clientId = clientId;
this.traceScope = traceScope;
@@ -1574,7 +1575,7 @@ public abstract class Server {
Iterator<RpcCall> iter = responseQueue.listIterator(0);
while (iter.hasNext()) {
call = iter.next();
- if (now > call.timestampNanos + PURGE_INTERVAL_NANOS) {
+ if (now > call.responseTimestampNanos + PURGE_INTERVAL_NANOS) {
closeConnection(call.connection);
break;
}
@@ -1638,7 +1639,7 @@ public abstract class Server {
if (inHandler) {
// set the serve time when the response has to be sent later
- call.timestampNanos = Time.monotonicNowNanos();
+ call.responseTimestampNanos = Time.monotonicNowNanos();
incPending();
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org