HADOOP-14166. Reset the DecayRpcScheduler AvgResponseTime metric to zero when queue is not used. Contributed by Surendra Singh Lilhore.

This commit is contained in:
Brahma Reddy Battula 2017-05-25 01:27:13 +08:00 committed by Xiaoyu Yao
parent ddfdfbdbd1
commit 49ea48078b
1 changed files with 2 additions and 0 deletions

View File

@ -618,6 +618,8 @@ public class DecayRpcScheduler implements RpcScheduler,
} else {
responseTimeAvgInLastWindow.set(i, averageResponseTime);
}
} else {
responseTimeAvgInLastWindow.set(i, 0);
}
responseTimeCountInLastWindow.set(i, responseTimeCount);
if (LOG.isDebugEnabled()) {