org.apache.hadoop.hdfs.protocol
Class CachePoolInfo

java.lang.Object
  extended by 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.


Field Summary
static long DEFAULT_LIMIT
           
static long DEFAULT_MAX_RELATIVE_EXPIRY
          Default max relative expiry for cache pools.
static long LIMIT_UNLIMITED
           
static org.apache.commons.logging.Log LOG
           
static long RELATIVE_EXPIRY_NEVER
          Indicates that the pool does not have a maximum relative expiry.
 
Constructor Summary
CachePoolInfo(String poolName)
           
 
Method Summary
 boolean equals(Object o)
           
 String getGroupName()
           
 Long getLimit()
           
 Long getMaxRelativeExpiryMs()
           
 org.apache.hadoop.fs.permission.FsPermission getMode()
           
 String getOwnerName()
           
 String getPoolName()
           
 int hashCode()
           
 CachePoolInfo setGroupName(String groupName)
           
 CachePoolInfo setLimit(Long bytes)
           
 CachePoolInfo setMaxRelativeExpiryMs(Long ms)
          Set the maximum relative expiration of directives of this pool in milliseconds.
 CachePoolInfo setMode(org.apache.hadoop.fs.permission.FsPermission mode)
           
 CachePoolInfo setOwnerName(String ownerName)
           
 String toString()
           
static void validate(CachePoolInfo info)
           
static void validateName(String poolName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

CachePoolInfo

public CachePoolInfo(String poolName)
Method Detail

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.