Class NNUpgradeUtil

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.NNUpgradeUtil

public abstract class NNUpgradeUtil extends Object
  • Constructor Details

    • NNUpgradeUtil

      public NNUpgradeUtil()
  • Method Details

    • renameCurToTmp

      public static void renameCurToTmp(Storage.StorageDirectory sd) throws IOException
      Rename the existing current dir to previous.tmp, and create a new empty current dir.
      Throws:
      IOException
    • doUpgrade

      public static void doUpgrade(Storage.StorageDirectory sd, Storage storage) throws IOException
      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 upgrade
      storage - info about the new upgraded versions.
      Throws:
      IOException - in the event of error