From ef9e1ba76357f6aaa5489ba1d5ed40ffff40a2cc Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Tue, 2 Apr 2013 02:11:07 +0000 Subject: [PATCH] HDFS-4656. DN heartbeat loop can be briefly tight. Contributed by Aaron T. Myers. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1463357 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4922e7ec722..f63c83b495d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -463,6 +463,8 @@ Release 2.0.5-beta - UNRELEASED HDFS-4655. DNA_FINALIZE is logged as being an unknown command by the DN when received from the standby NN. (atm) + HDFS-4656. DN heartbeat loop can be briefly tight. (atm) + Release 2.0.4-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java index ad4a78e30fe..75f42f959d7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java @@ -512,7 +512,7 @@ class BPServiceActor implements Runnable { // // Every so often, send heartbeat or block-report // - if (startTime - lastHeartbeat > dnConf.heartBeatInterval) { + if (startTime - lastHeartbeat >= dnConf.heartBeatInterval) { // // All heartbeat messages include following info: // -- Datanode name