org.apache.hadoop.hdfs.protocol
Class CachePoolInfo
java.lang.Object
org.apache.hadoop.hdfs.protocol.CachePoolInfo
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class CachePoolInfo
- extends Object
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.
LOG
public static final org.apache.commons.logging.Log LOG
RELATIVE_EXPIRY_NEVER
public static final long RELATIVE_EXPIRY_NEVER
- Indicates that the pool does not have a maximum relative expiry.
- See Also:
- Constant Field Values
DEFAULT_MAX_RELATIVE_EXPIRY
public static final long DEFAULT_MAX_RELATIVE_EXPIRY
- Default max relative expiry for cache pools.
- See Also:
- Constant Field Values
LIMIT_UNLIMITED
public static final long LIMIT_UNLIMITED
- See Also:
- Constant Field Values
DEFAULT_LIMIT
public static final long DEFAULT_LIMIT
- See Also:
- Constant Field Values
CachePoolInfo
public CachePoolInfo(String poolName)
getPoolName
public String getPoolName()
- Returns:
- Name of the pool.
getOwnerName
public String getOwnerName()
- Returns:
- The owner of the pool. Along with the group and mode, determines
who has access to view and modify the pool.
setOwnerName
public CachePoolInfo setOwnerName(String ownerName)
getGroupName
public String getGroupName()
- Returns:
- The group of the pool. Along with the owner and mode, determines
who has access to view and modify the pool.
setGroupName
public CachePoolInfo setGroupName(String groupName)
getMode
public org.apache.hadoop.fs.permission.FsPermission 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
public CachePoolInfo setMode(org.apache.hadoop.fs.permission.FsPermission mode)
getLimit
public Long getLimit()
- Returns:
- The maximum aggregate number of bytes that can be cached by
directives in this pool.
setLimit
public CachePoolInfo setLimit(Long bytes)
getMaxRelativeExpiryMs
public Long getMaxRelativeExpiryMs()
- Returns:
- The maximum relative expiration of directives of this pool in
milliseconds
setMaxRelativeExpiryMs
public CachePoolInfo setMaxRelativeExpiryMs(Long ms)
- Set the maximum relative expiration of directives of this pool in
milliseconds.
- Parameters:
ms
- in milliseconds
- Returns:
- This builder, for call chaining.
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
validate
public static void validate(CachePoolInfo info)
throws IOException
- Throws:
IOException
validateName
public static void validateName(String poolName)
throws IOException
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.