Class RouterCacheAdmin

java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterCacheAdmin
Direct Known Subclasses:
RouterAsyncCacheAdmin

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

  • Method Details

    • addCacheDirective

      public long addCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) throws IOException
      Throws:
      IOException
    • invokeAddCacheDirective

      protected Map<RemoteLocation,Long> invokeAddCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) throws IOException
      Throws:
      IOException
    • modifyCacheDirective

      public void modifyCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo directive, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) throws IOException
      Throws:
      IOException
    • removeCacheDirective

      public void removeCacheDirective(long id) throws IOException
      Throws:
      IOException
    • 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
      Throws:
      IOException
    • invokeListCacheDirectives

      protected Map invokeListCacheDirectives(long prevId, org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo filter) throws IOException
      Throws:
      IOException
    • addCachePool

      public void addCachePool(org.apache.hadoop.hdfs.protocol.CachePoolInfo info) throws IOException
      Throws:
      IOException
    • modifyCachePool

      public void modifyCachePool(org.apache.hadoop.hdfs.protocol.CachePoolInfo info) throws IOException
      Throws:
      IOException
    • removeCachePool

      public void removeCachePool(String cachePoolName) throws IOException
      Throws:
      IOException
    • listCachePools

      public org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CachePoolEntry> listCachePools(String prevKey) throws IOException
      Throws:
      IOException
    • invokeListCachePools

      protected Map<FederationNamespaceInfo,org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries> invokeListCachePools(String prevKey) throws IOException
      Throws:
      IOException
    • getRemoteMap

      protected Map<RemoteLocation,org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo> getRemoteMap(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, List<RemoteLocation> locations)
      Returns a map with the CacheDirectiveInfo mapped to each location.
      Parameters:
      path - CacheDirectiveInfo to be mapped to the locations.
      locations - the locations to map.
      Returns:
      map with CacheDirectiveInfo mapped to the locations.