From 831d18a422f5245b6c491bbc90de8a0fd41a2eaa Mon Sep 17 00:00:00 2001 From: Aaron Myers Date: Tue, 2 Apr 2013 02:13:10 +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/branches/branch-2@1463358 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 a4fbb9c391f..fbc200aec25 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -118,6 +118,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