Class RouterAsyncCacheAdmin

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterCacheAdmin
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncCacheAdmin

public class RouterAsyncCacheAdmin extends RouterCacheAdmin
Module that implements all the asynchronous RPC calls in ClientProtocol related to Cache Admin in the RouterRpcServer.
  • Constructor Details

    • RouterAsyncCacheAdmin

      public RouterAsyncCacheAdmin(RouterRpcServer server)
  • Method Details

    • addCacheDirective

      public long addCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) throws IOException
      Asynchronously adds a new cache directive with the given path and flags. This method invokes the addCacheDirective method concurrently across all namespaces, and returns the first response as a long value representing the directive ID.
      Overrides:
      addCacheDirective in class RouterCacheAdmin
      Parameters:
      path - The cache directive path.
      flags - The cache flags.
      Returns:
      The ID of the newly added cache directive.
      Throws:
      IOException - If an I/O error occurs.
    • listCacheDirectives

      public org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CacheDirectiveEntry> listCacheDirectives(long prevId, org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo filter) throws IOException
      Asynchronously lists cache directives based on the provided previous ID and filter. This method invokes the listCacheDirectives method concurrently across all namespaces, and returns the first response as a BatchedEntries object containing the cache directive entries.
      Overrides:
      listCacheDirectives in class RouterCacheAdmin
      Parameters:
      prevId - The previous ID from which to start listing.
      filter - The filter to apply to the cache directives.
      Returns:
      BatchedEntries of cache directive entries.
      Throws:
      IOException - If an I/O error occurs.
    • listCachePools

      public org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CachePoolEntry> listCachePools(String prevKey) throws IOException
      Asynchronously lists cache pools starting from the provided key. This method invokes the listCachePools method concurrently across all namespaces, and returns the first response as a BatchedEntries object containing the cache pool entries.
      Overrides:
      listCachePools in class RouterCacheAdmin
      Parameters:
      prevKey - The previous key from which to start listing.
      Returns:
      BatchedEntries of cache pool entries.
      Throws:
      IOException - If an I/O error occurs.