HDFS-7932. Speed up the shutdown of datanode during rolling upgrade. Contributed by Kihwal Lee.
(cherry picked from commit 61a4c7fc98
)
This commit is contained in:
parent
ef9aa7c34b
commit
2b9173059d
|
@ -913,6 +913,8 @@ Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-7816. Unable to open webhdfs paths with "+". (wheat9 via kihwal)
|
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
|
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
||||||
|
|
|
@ -1731,8 +1731,9 @@ public class DataNode extends ReconfigurableBase
|
||||||
// termination of receiver threads.
|
// termination of receiver threads.
|
||||||
if (!this.shutdownForUpgrade ||
|
if (!this.shutdownForUpgrade ||
|
||||||
(this.shutdownForUpgrade && (Time.monotonicNow() - timeNotified
|
(this.shutdownForUpgrade && (Time.monotonicNow() - timeNotified
|
||||||
> 2500))) {
|
> 1000))) {
|
||||||
this.threadGroup.interrupt();
|
this.threadGroup.interrupt();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
LOG.info("Waiting for threadgroup to exit, active threads is " +
|
LOG.info("Waiting for threadgroup to exit, active threads is " +
|
||||||
this.threadGroup.activeCount());
|
this.threadGroup.activeCount());
|
||||||
|
@ -1743,8 +1744,8 @@ public class DataNode extends ReconfigurableBase
|
||||||
Thread.sleep(sleepMs);
|
Thread.sleep(sleepMs);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
sleepMs = sleepMs * 3 / 2; // exponential backoff
|
sleepMs = sleepMs * 3 / 2; // exponential backoff
|
||||||
if (sleepMs > 1000) {
|
if (sleepMs > 200) {
|
||||||
sleepMs = 1000;
|
sleepMs = 200;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.threadGroup = null;
|
this.threadGroup = null;
|
||||||
|
|
Loading…
Reference in New Issue