Class RouterAsyncStoragePolicy

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterStoragePolicy
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncStoragePolicy

public class RouterAsyncStoragePolicy extends RouterStoragePolicy
Module that implements all the asynchronous RPC calls in ClientProtocol related to Storage Policy in the RouterRpcServer.
  • Constructor Details

    • RouterAsyncStoragePolicy

      public RouterAsyncStoragePolicy(RouterRpcServer server)
  • Method Details

    • getStoragePolicy

      public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy getStoragePolicy(String path) throws IOException
      Asynchronously get the storage policy for a given path. This method checks the operation category and then invokes the getStoragePolicy method sequentially for the given path.
      Overrides:
      getStoragePolicy in class RouterStoragePolicy
      Parameters:
      path - The path for which to retrieve the storage policy.
      Returns:
      The BlockStoragePolicy for the given path.
      Throws:
      IOException - If an I/O error occurs.
    • getStoragePolicies

      public org.apache.hadoop.hdfs.protocol.BlockStoragePolicy[] getStoragePolicies() throws IOException
      Asynchronously get an array of all available storage policies. This method checks the operation category and then invokes the getStoragePolicies method across all available namespaces.
      Overrides:
      getStoragePolicies in class RouterStoragePolicy
      Returns:
      An array of BlockStoragePolicy.
      Throws:
      IOException - If an I/O error occurs.