HDFS-3276. initializeSharedEdits should have a -nonInteractive flag. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1372627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4ad5b20ce
commit
b2511abfc8
|
@ -196,6 +196,8 @@ Release 2.0.1-alpha - UNRELEASED
|
||||||
HDFS-3190. Simple refactors in existing NN code to assist
|
HDFS-3190. Simple refactors in existing NN code to assist
|
||||||
QuorumJournalManager extension. (todd)
|
QuorumJournalManager extension. (todd)
|
||||||
|
|
||||||
|
HDFS-3276. initializeSharedEdits should have a -nonInteractive flag (todd)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-2982. Startup performance suffers when there are many edit log
|
HDFS-2982. Startup performance suffers when there are many edit log
|
||||||
|
|
|
@ -939,7 +939,10 @@ public class NameNode {
|
||||||
StartupOption.ROLLBACK.getName() + "] | [" +
|
StartupOption.ROLLBACK.getName() + "] | [" +
|
||||||
StartupOption.FINALIZE.getName() + "] | [" +
|
StartupOption.FINALIZE.getName() + "] | [" +
|
||||||
StartupOption.IMPORT.getName() + "] | [" +
|
StartupOption.IMPORT.getName() + "] | [" +
|
||||||
StartupOption.INITIALIZESHAREDEDITS.getName() + "] | [" +
|
StartupOption.INITIALIZESHAREDEDITS.getName() +
|
||||||
|
" [" + StartupOption.FORCE.getName() + "] [" +
|
||||||
|
StartupOption.NONINTERACTIVE.getName() + "]" +
|
||||||
|
"] | [" +
|
||||||
StartupOption.BOOTSTRAPSTANDBY.getName() + "] | [" +
|
StartupOption.BOOTSTRAPSTANDBY.getName() + "] | [" +
|
||||||
StartupOption.RECOVER.getName() + " [ " +
|
StartupOption.RECOVER.getName() + " [ " +
|
||||||
StartupOption.FORCE.getName() + " ] ]");
|
StartupOption.FORCE.getName() + " ] ]");
|
||||||
|
@ -1009,6 +1012,16 @@ public class NameNode {
|
||||||
return startOpt;
|
return startOpt;
|
||||||
} else if (StartupOption.INITIALIZESHAREDEDITS.getName().equalsIgnoreCase(cmd)) {
|
} else if (StartupOption.INITIALIZESHAREDEDITS.getName().equalsIgnoreCase(cmd)) {
|
||||||
startOpt = StartupOption.INITIALIZESHAREDEDITS;
|
startOpt = StartupOption.INITIALIZESHAREDEDITS;
|
||||||
|
for (i = i + 1 ; i < argsLen; i++) {
|
||||||
|
if (StartupOption.NONINTERACTIVE.getName().equals(args[i])) {
|
||||||
|
startOpt.setInteractiveFormat(false);
|
||||||
|
} else if (StartupOption.FORCE.getName().equals(args[i])) {
|
||||||
|
startOpt.setForceFormat(true);
|
||||||
|
} else {
|
||||||
|
LOG.fatal("Invalid argument: " + args[i]);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
return startOpt;
|
return startOpt;
|
||||||
} else if (StartupOption.RECOVER.getName().equalsIgnoreCase(cmd)) {
|
} else if (StartupOption.RECOVER.getName().equalsIgnoreCase(cmd)) {
|
||||||
if (startOpt != StartupOption.REGULAR) {
|
if (startOpt != StartupOption.REGULAR) {
|
||||||
|
@ -1118,7 +1131,9 @@ public class NameNode {
|
||||||
return null; // avoid warning
|
return null; // avoid warning
|
||||||
}
|
}
|
||||||
case INITIALIZESHAREDEDITS: {
|
case INITIALIZESHAREDEDITS: {
|
||||||
boolean aborted = initializeSharedEdits(conf, false, true);
|
boolean aborted = initializeSharedEdits(conf,
|
||||||
|
startOpt.getForceFormat(),
|
||||||
|
startOpt.getInteractiveFormat());
|
||||||
terminate(aborted ? 1 : 0);
|
terminate(aborted ? 1 : 0);
|
||||||
return null; // avoid warning
|
return null; // avoid warning
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue