Enum ContainerLayoutVersion

java.lang.Object
java.lang.Enum<ContainerLayoutVersion>
org.apache.hadoop.ozone.container.common.impl.ContainerLayoutVersion
All Implemented Interfaces:
Serializable, Comparable<ContainerLayoutVersion>

public enum ContainerLayoutVersion extends Enum<ContainerLayoutVersion>
Defines layout versions for the Chunks.
  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static ContainerLayoutVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ContainerLayoutVersion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getContainerLayoutVersion

      public static ContainerLayoutVersion getContainerLayoutVersion(int containerVersion)
      Return ContainerLayoutVersion object for the numeric containerVersion.
    • getAllVersions

      public static List<ContainerLayoutVersion> getAllVersions()
      Returns:
      list of all versions.
    • getConfiguredVersion

      public static ContainerLayoutVersion getConfiguredVersion(org.apache.hadoop.hdds.conf.ConfigurationSource conf)
      Returns:
      the latest version.
    • getVersion

      public int getVersion()
      Returns:
      version number.
    • getDescription

      public String getDescription()
      Returns:
      description.
    • getChunkFile

      public abstract File getChunkFile(File chunkDir, org.apache.hadoop.hdds.client.BlockID blockID, String chunkName)
    • getChunkFile

      public File getChunkFile(ContainerData containerData, org.apache.hadoop.hdds.client.BlockID blockID, String chunkName) throws org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
      Throws:
      org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ContainerLayoutVersion>