Class RouterAsyncCacheAdmin
java.lang.Object
org.apache.hadoop.hdfs.server.federation.router.RouterCacheAdmin
org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncCacheAdmin
Module that implements all the asynchronous 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) Asynchronously adds a new cache directive with the given path and flags.org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CacheDirectiveEntry>listCacheDirectives(long prevId, org.apache.hadoop.hdfs.protocol.CacheDirectiveInfo filter) Asynchronously lists cache directives based on the provided previous ID and filter.org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<org.apache.hadoop.hdfs.protocol.CachePoolEntry>listCachePools(String prevKey) Asynchronously lists cache pools starting from the provided key.Methods inherited from class org.apache.hadoop.hdfs.server.federation.router.RouterCacheAdmin
addCachePool, getRemoteMap, invokeAddCacheDirective, invokeListCacheDirectives, invokeListCachePools, modifyCacheDirective, modifyCachePool, removeCacheDirective, removeCachePool
-
Constructor Details
-
RouterAsyncCacheAdmin
-
-
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:
addCacheDirectivein classRouterCacheAdmin- 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:
listCacheDirectivesin classRouterCacheAdmin- 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:
listCachePoolsin classRouterCacheAdmin- Parameters:
prevKey- The previous key from which to start listing.- Returns:
- BatchedEntries of cache pool entries.
- Throws:
IOException- If an I/O error occurs.
-