HDFS-10306. SafeModeMonitor should not leave safe mode if name system is starting active service. Contributed by Mingliang Liu.

This commit is contained in:
Jing Zhao 2016-04-18 18:05:49 -07:00
parent cb3ca460ef
commit be0bce1b71
1 changed files with 3 additions and 1 deletions

View File

@ -623,7 +623,9 @@ class BlockManagerSafeMode {
* the extension time has passed. * the extension time has passed.
*/ */
private boolean canLeave() { private boolean canLeave() {
if (timeToLeaveExtension() > 0) { if (namesystem.inTransitionToActive()) {
return false;
} else if (timeToLeaveExtension() > 0) {
reportStatus("STATE* Safe mode ON, in safe mode extension.", false); reportStatus("STATE* Safe mode ON, in safe mode extension.", false);
return false; return false;
} else if (!areThresholdsMet()) { } else if (!areThresholdsMet()) {