Skip to content

Commit

Permalink
HDFS-7932. Speed up the shutdown of datanode during rolling upgrade. …
Browse files Browse the repository at this point in the history
…Contributed by Kihwal Lee.
  • Loading branch information
kihwal committed Mar 19, 2015
1 parent 1ccbc29 commit 61a4c7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,9 @@ public void shutdown() {
// 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());
Expand All @@ -1736,8 +1737,8 @@ public void shutdown() {
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;
Expand Down

0 comments on commit 61a4c7f

Please sign in to comment.