Class DatanodeVersionFile

java.lang.Object
org.apache.hadoop.ozone.container.common.helpers.DatanodeVersionFile

public class DatanodeVersionFile extends Object
This is a utility class which helps to create the version file on datanode and also validate the content of the version file.
  • Constructor Details

    • DatanodeVersionFile

      public DatanodeVersionFile(String storageId, String clusterId, String datanodeUuid, long cTime, int layoutVersion)
  • Method Details

    • createVersionFile

      public void createVersionFile(File path) throws IOException
      Creates a version File in specified path.
      Parameters:
      path -
      Throws:
      IOException
    • readFrom

      public static Properties readFrom(File versionFile) throws IOException
      Creates a property object from the specified file content.
      Parameters:
      versionFile -
      Returns:
      Properties
      Throws:
      IOException