Class RouterAsyncSnapshot

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterSnapshot
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncSnapshot

public class RouterAsyncSnapshot extends RouterSnapshot
Module that implements all the asynchronous RPC calls related to snapshots in ClientProtocol in the RouterRpcServer.
  • Constructor Details

  • Method Details

    • createSnapshot

      public String createSnapshot(String snapshotRoot, String snapshotName) throws IOException
      Asynchronously creates a snapshot with the given root and name. This method checks the operation category and then invokes the createSnapshot method concurrently across all namespaces, returning the first successful response.
      Overrides:
      createSnapshot in class RouterSnapshot
      Parameters:
      snapshotRoot - The root path of the snapshot.
      snapshotName - The name of the snapshot.
      Returns:
      The path of the created snapshot.
      Throws:
      IOException - If an I/O error occurs.
    • getSnapshottableDirListing

      public org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus[] getSnapshottableDirListing() throws IOException
      Asynchronously get an array of snapshottable directory listings. This method checks the operation category and then invokes the getSnapshottableDirListing method concurrently across all namespaces, merging the results into a single array.
      Overrides:
      getSnapshottableDirListing in class RouterSnapshot
      Returns:
      Array of SnapshottableDirectoryStatus.
      Throws:
      IOException - If an I/O error occurs.
    • getSnapshotListing

      public org.apache.hadoop.hdfs.protocol.SnapshotStatus[] getSnapshotListing(String snapshotRoot) throws IOException
      Asynchronously get an array of snapshot listings for the given snapshot root. This method checks the operation category and then invokes the getSnapshotListing method, either sequentially or concurrently based on the configuration, and returns the merged results.
      Overrides:
      getSnapshotListing in class RouterSnapshot
      Parameters:
      snapshotRoot - The root path of the snapshots.
      Returns:
      Array of SnapshotStatus.
      Throws:
      IOException - If an I/O error occurs.
    • getSnapshotDiffReport

      public org.apache.hadoop.hdfs.protocol.SnapshotDiffReport getSnapshotDiffReport(String snapshotRoot, String earlierSnapshotName, String laterSnapshotName) throws IOException
      Asynchronously get a snapshot diff report for the given root and snapshot names. This method checks the operation category and then invokes the getSnapshotDiffReport method, either sequentially or concurrently based on the configuration, and returns the result.
      Overrides:
      getSnapshotDiffReport in class RouterSnapshot
      Parameters:
      snapshotRoot - The root path of the snapshot.
      earlierSnapshotName - The name of the earlier snapshot.
      laterSnapshotName - The name of the later snapshot.
      Returns:
      SnapshotDiffReport for the snapshots.
      Throws:
      IOException - If an I/O error occurs.
    • getSnapshotDiffReportListing

      public org.apache.hadoop.hdfs.protocol.SnapshotDiffReportListing getSnapshotDiffReportListing(String snapshotRoot, String earlierSnapshotName, String laterSnapshotName, byte[] startPath, int index) throws IOException
      Asynchronously get a snapshot diff report listing for the given root and snapshot names. This method checks the operation category and then invokes the getSnapshotDiffReportListing method, either sequentially or concurrently based on the configuration, and returns the result.
      Overrides:
      getSnapshotDiffReportListing in class RouterSnapshot
      Parameters:
      snapshotRoot - The root path of the snapshot.
      earlierSnapshotName - The name of the earlier snapshot.
      laterSnapshotName - The name of the later snapshot.
      startPath - The starting path for the diff report.
      index - The index for the diff report listing.
      Returns:
      SnapshotDiffReportListing for the snapshots.
      Throws:
      IOException - If an I/O error occurs.