Class NNUpgradeUtil
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.NNUpgradeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddoUpgrade(Storage.StorageDirectory sd, Storage storage) Perform the upgrade of the storage dir to the given storage info.static voidRename the existing current dir to previous.tmp, and create a new empty current dir.
-
Constructor Details
-
NNUpgradeUtil
public NNUpgradeUtil()
-
-
Method Details
-
renameCurToTmp
Rename the existing current dir to previous.tmp, and create a new empty current dir.- Throws:
IOException
-
doUpgrade
Perform the upgrade of the storage dir to the given storage info. The new storage info is written into the current directory, and the previous.tmp directory is renamed to previous.- Parameters:
sd- the storage directory to upgradestorage- info about the new upgraded versions.- Throws:
IOException- in the event of error
-