private void verifyDistributedUpgradeProgress(StartupOption startOpt
) throws IOException {
if(startOpt == StartupOption.ROLLBACK || startOpt == StartupOption.IMPORT)
return;
UpgradeManager um = FSNamesystem.getFSNamesystem().upgradeManager;
assert um != null : "FSNameSystem.upgradeManager is null.";
if(startOpt != StartupOption.UPGRADE) {
if(um.getUpgradeState())
throw new IOException(
"\n Previous distributed upgrade was not completed. "
+ "\n Please restart NameNode with -upgrade option.");
if(um.getDistributedUpgrades() != null)
throw new IOException("\n Distributed upgrade for NameNode version "
+ um.getUpgradeVersion() + " to current LV " + FSConstants.LAYOUT_VERSION
+ " is required.\n Please restart NameNode with -upgrade option.");
}
}