Class RouterAsyncSnapshot
java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterSnapshot
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncSnapshot
Module that implements all the asynchronous RPC calls related to snapshots in
ClientProtocol in the RouterRpcServer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSnapshot(String snapshotRoot, String snapshotName) Asynchronously creates a snapshot with the given root and name.org.apache.hadoop.hdfs.protocol.SnapshotDiffReportgetSnapshotDiffReport(String snapshotRoot, String earlierSnapshotName, String laterSnapshotName) Asynchronously get a snapshot diff report for the given root and snapshot names.org.apache.hadoop.hdfs.protocol.SnapshotDiffReportListinggetSnapshotDiffReportListing(String snapshotRoot, String earlierSnapshotName, String laterSnapshotName, byte[] startPath, int index) Asynchronously get a snapshot diff report listing for the given root and snapshot names.org.apache.hadoop.hdfs.protocol.SnapshotStatus[]getSnapshotListing(String snapshotRoot) Asynchronously get an array of snapshot listings for the given snapshot root.org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus[]Asynchronously get an array of snapshottable directory listings.Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.RouterSnapshot
allowSnapshot, deleteSnapshot, disallowSnapshot, renameSnapshot
-
Constructor Details
-
RouterAsyncSnapshot
-
-
Method Details
-
createSnapshot
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:
createSnapshotin classRouterSnapshot- 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 IOExceptionAsynchronously 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:
getSnapshottableDirListingin classRouterSnapshot- 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:
getSnapshotListingin classRouterSnapshot- 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:
getSnapshotDiffReportin classRouterSnapshot- 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:
getSnapshotDiffReportListingin classRouterSnapshot- 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.
-