Class RouterCacheAdmin
java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterCacheAdmin
- Direct Known Subclasses:
RouterAsyncCacheAdmin
Module that implements all the RPC calls in
ClientProtocol related to Cache Admin
in the RouterRpcServer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongaddCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) voidaddCachePool(org.apache.hadoop.hdfs.protocol.CachePoolInfo info) 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.protected Map<RemoteLocation,Long> invokeAddCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo path, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) protected MapinvokeListCacheDirectives(long prevId, org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo filter) protected Map<FederationNamespaceInfo,org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries> invokeListCachePools(String prevKey) org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CacheDirectiveEntry>listCacheDirectives(long prevId, org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo filter) org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CachePoolEntry>listCachePools(String prevKey) voidmodifyCacheDirective(org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo directive, EnumSet<org.apache.hadoop.fs.CacheFlag> flags) voidmodifyCachePool(org.apache.hadoop.hdfs.protocol.CachePoolInfo info) voidremoveCacheDirective(long id) voidremoveCachePool(String cachePoolName)
-
Constructor Details
-
RouterCacheAdmin
-
-
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
- 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
- Throws:
IOException
-
modifyCachePool
- Throws:
IOException
-
removeCachePool
- 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.
-