You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ki...@apache.org on 2015/03/19 18:28:55 UTC

hadoop git commit: HDFS-7932. Speed up the shutdown of datanode during rolling upgrade. Contributed by Kihwal Lee. (cherry picked from commit 61a4c7fc9891def0e85edf7e41d74c6b92c85fdb)

Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ef9aa7c34 -> 2b9173059


HDFS-7932. Speed up the shutdown of datanode during rolling upgrade. Contributed by Kihwal Lee.
(cherry picked from commit 61a4c7fc9891def0e85edf7e41d74c6b92c85fdb)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2b917305
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2b917305
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2b917305

Branch: refs/heads/branch-2
Commit: 2b9173059d5941514107150b9d0a80d9debd85c4
Parents: ef9aa7c
Author: Kihwal Lee <ki...@apache.org>
Authored: Thu Mar 19 12:28:36 2015 -0500
Committer: Kihwal Lee <ki...@apache.org>
Committed: Thu Mar 19 12:28:36 2015 -0500

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 2 ++
 .../java/org/apache/hadoop/hdfs/server/datanode/DataNode.java | 7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b917305/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 2e5e8d1..ead8912 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -913,6 +913,8 @@ Release 2.7.0 - UNRELEASED
 
     HDFS-7816. Unable to open webhdfs paths with "+". (wheat9 via kihwal)
 
+    HDFS-7932. Speed up the shutdown of datanode during rolling upgrade.(kihwal)
+
     BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
 
       HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2b917305/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
index c31d2b4..b32a0fc 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
@@ -1731,8 +1731,9 @@ public class DataNode extends ReconfigurableBase
         // termination of receiver threads.
         if (!this.shutdownForUpgrade ||
             (this.shutdownForUpgrade && (Time.monotonicNow() - timeNotified
-                > 2500))) {
+                > 1000))) {
           this.threadGroup.interrupt();
+          break;
         }
         LOG.info("Waiting for threadgroup to exit, active threads is " +
                  this.threadGroup.activeCount());
@@ -1743,8 +1744,8 @@ public class DataNode extends ReconfigurableBase
           Thread.sleep(sleepMs);
         } catch (InterruptedException e) {}
         sleepMs = sleepMs * 3 / 2; // exponential backoff
-        if (sleepMs > 1000) {
-          sleepMs = 1000;
+        if (sleepMs > 200) {
+          sleepMs = 200;
         }
       }
       this.threadGroup = null;