Class VersionedDatanodeFeatures.ScmHA

java.lang.Object
org.apache.hadoop.ozone.container.upgrade.VersionedDatanodeFeatures.ScmHA
Enclosing class:
VersionedDatanodeFeatures

public static class VersionedDatanodeFeatures.ScmHA extends Object
Utilities for SCM HA layout feature. Prior to SCM HA finalization, datanode volumes used the format <volume>/hdds/<scm-id>. After SCM HA, the expected format is <volume>/hdds/<cluster-id>. In pre-finalize for SCM HA, datanodes will still use the SCM ID for container file paths. The exception is if the cluster is already using cluster ID paths (since SCM HA was merged before the upgrade framework). In this case, cluster ID paths should continue to be used. On finalization of SCM HA, datanodes will create a symlink from the SCM ID directory to the cluster ID directory and use cluster ID in container file paths. If a cluster ID directory is already present, no changes are made.
  • Constructor Details

    • ScmHA

      public ScmHA()
  • Method Details

    • chooseContainerPathID

      public static String chooseContainerPathID(StorageVolume volume, String clusterID) throws IOException
      Choose whether to use cluster ID or SCM ID based on the format of the volume and SCM HA finalization status.
      Throws:
      IOException
    • upgradeVolumeIfNeeded

      public static boolean upgradeVolumeIfNeeded(StorageVolume volume, String clusterID)