From a99274ea967da32c8c187c3ee8ea222186145874 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 319ac5875ad..dc92fdf24fa 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -860,6 +860,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);