Class OmSnapshotLocalDataManager

java.lang.Object
org.apache.hadoop.ozone.om.snapshot.OmSnapshotLocalDataManager
All Implemented Interfaces:
AutoCloseable

public class OmSnapshotLocalDataManager extends Object implements AutoCloseable
Manages local data and metadata associated with Ozone Manager (OM) snapshots, including the creation, storage, and representation of data as YAML files.
  • Constructor Details

    • OmSnapshotLocalDataManager

      public OmSnapshotLocalDataManager(org.apache.hadoop.ozone.om.OMMetadataManager omMetadataManager) throws IOException
      Throws:
      IOException
  • Method Details

    • getSnapshotLocalPropertyYamlPath

      public static String getSnapshotLocalPropertyYamlPath(Path snapshotPath)
      Returns the path to the YAML file that stores local properties for the given snapshot.
      Parameters:
      snapshotPath - path to the snapshot checkpoint dir
      Returns:
      the path to the snapshot's local property YAML file
    • getSnapshotLocalPropertyYamlPath

      public String getSnapshotLocalPropertyYamlPath(org.apache.hadoop.ozone.om.helpers.SnapshotInfo snapshotInfo)
      Returns the path to the YAML file that stores local properties for the given snapshot.
      Parameters:
      snapshotInfo - snapshot metadata
      Returns:
      the path to the snapshot's local property YAML file
    • getSnapshotLocalPropertyYamlPath

      public String getSnapshotLocalPropertyYamlPath(UUID snapshotId)
    • createNewOmSnapshotLocalDataFile

      public void createNewOmSnapshotLocalDataFile(org.apache.hadoop.hdds.utils.db.RDBStore snapshotStore, org.apache.hadoop.ozone.om.helpers.SnapshotInfo snapshotInfo) throws IOException
      Creates and writes snapshot local properties to a YAML file with not defragged SST file list.
      Parameters:
      snapshotStore - snapshot metadata manager.
      snapshotInfo - snapshot info instance corresponding to snapshot.
      Throws:
      IOException
    • getOmSnapshotLocalData

      public OmSnapshotLocalData getOmSnapshotLocalData(org.apache.hadoop.ozone.om.helpers.SnapshotInfo snapshotInfo) throws IOException
      Throws:
      IOException
    • getOmSnapshotLocalData

      public OmSnapshotLocalData getOmSnapshotLocalData(UUID snapshotId) throws IOException
      Throws:
      IOException
    • getOmSnapshotLocalData

      public OmSnapshotLocalData getOmSnapshotLocalData(File snapshotDataPath) throws IOException
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable