From 19c2c22bbe661f9e628f2043313079c95f1a6971 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Tue, 1 Dec 2015 09:27:23 -0800 Subject: [PATCH] HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. (Contributed by Masatake Iwasaki) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 89be9207545..49ee0e6e6d9 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -872,6 +872,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12313. NPE in JvmPauseMonitor when calling stop() before start(). (Gabor Liptak via wheat9) + HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. + (Masatake Iwasaki via Arpit Agarwal) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java index d06b25cbbaf..a6a14d08beb 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java @@ -151,7 +151,7 @@ public class DecayRpcScheduler implements RpcScheduler, DecayRpcSchedulerMXBean // Setup delay timer Timer timer = new Timer(); DecayTask task = new DecayTask(this, timer); - timer.scheduleAtFixedRate(task, 0, this.decayPeriodMillis); + timer.scheduleAtFixedRate(task, decayPeriodMillis, decayPeriodMillis); MetricsProxy prox = MetricsProxy.getInstance(ns); prox.setDelegate(this);