Package org.apache.hadoop.hdfs.protocol
Class CachePoolInfo
java.lang.Object
org.apache.hadoop.hdfs.protocol.CachePoolInfo
CachePoolInfo describes a cache pool.
This class is used in RPCs to create and modify cache pools.
It is serializable and can be stored in the edit log.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final longDefault max relative expiry for cache pools.static final shortstatic final longstatic final longIndicates that the pool does not have a maximum relative expiry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetLimit()getMode()inthashCode()setDefaultReplication(Short repl) setGroupName(String groupName) Set the maximum relative expiration of directives of this pool in milliseconds.setMode(FsPermission mode) setOwnerName(String ownerName) toString()static voidvalidate(CachePoolInfo info) static voidvalidateName(String poolName)
-
Field Details
-
RELATIVE_EXPIRY_NEVER
public static final long RELATIVE_EXPIRY_NEVERIndicates that the pool does not have a maximum relative expiry.- See Also:
-
DEFAULT_MAX_RELATIVE_EXPIRY
public static final long DEFAULT_MAX_RELATIVE_EXPIRYDefault max relative expiry for cache pools.- See Also:
-
LIMIT_UNLIMITED
public static final long LIMIT_UNLIMITED- See Also:
-
DEFAULT_LIMIT
public static final long DEFAULT_LIMIT- See Also:
-
DEFAULT_REPLICATION_NUM
public static final short DEFAULT_REPLICATION_NUM- See Also:
-
-
Constructor Details
-
CachePoolInfo
-
-
Method Details
-
getPoolName
- Returns:
- Name of the pool.
-
getOwnerName
- Returns:
- The owner of the pool. Along with the group and mode, determines who has access to view and modify the pool.
-
setOwnerName
-
getGroupName
- Returns:
- The group of the pool. Along with the owner and mode, determines who has access to view and modify the pool.
-
setGroupName
-
getMode
- Returns:
- Unix-style permissions of the pool. Along with the owner and group, determines who has access to view and modify the pool.
-
setMode
-
getLimit
- Returns:
- The maximum aggregate number of bytes that can be cached by directives in this pool.
-
setLimit
-
getDefaultReplication
- Returns:
- The default replication num for CacheDirective in this pool
-
setDefaultReplication
-
getMaxRelativeExpiryMs
- Returns:
- The maximum relative expiration of directives of this pool in milliseconds
-
setMaxRelativeExpiryMs
Set the maximum relative expiration of directives of this pool in milliseconds.- Parameters:
ms- in milliseconds- Returns:
- This builder, for call chaining.
-
toString
-
equals
-
hashCode
public int hashCode() -
validate
- Throws:
IOException
-
validateName
- Throws:
IOException
-