if (areResourcesLow()) { adminMsg = "Resources are low on NN. Please add or free up more " + "resources then turn off safe mode manually. NOTE: If you turn off" + "the NN will immediately return to safe mode. "; if (isManual() || areResourcesLow()) { return adminMsg + "Use \"hdfs dfsadmin -safemode leave\" to turn safe mode off.";
if (areResourcesLow()) { adminMsg = "Resources are low on NN. Please add or free up more " + "resources then turn off safe mode manually. NOTE: If you turn off" + "the NN will immediately return to safe mode. "; if (isManual() || areResourcesLow()) { return adminMsg + "Use \"hdfs dfsadmin -safemode leave\" to turn safe mode off.";
/** * Decrement number of safe blocks if current block has * fallen below minimal replication. * @param replication current replication */ private synchronized void decrementSafeBlockCount(short replication) { if (replication == safeReplication-1) { this.blockSafe--; //blockSafe is set to -1 in manual / low resources safemode assert blockSafe >= 0 || isManual() || areResourcesLow(); checkMode(); } }
/** * Decrement number of safe blocks if current block has * fallen below minimal replication. * @param replication current replication */ private synchronized void decrementSafeBlockCount(short replication) { if (replication == safeReplication-1) { this.blockSafe--; //blockSafe is set to -1 in manual / low resources safemode assert blockSafe >= 0 || isManual() || areResourcesLow(); checkMode(); } }