Class CachePool
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.CachePool
A CachePool describes a set of cache resources being managed by the NameNode.
User caching requests are billed to the cache pool specified in the request.
This is an internal class, only used on the NameNode. For identifying or
describing a cache pool to clients, please use CachePoolInfo.
CachePools must be accessed under the FSNamesystem lock.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBytesCached(long bytes) voidaddBytesNeeded(long bytes) voidaddFilesCached(long files) voidaddFilesNeeded(long files) longlonglongshortorg.apache.hadoop.hdfs.protocol.CachePoolEntryReturns a CachePoolInfo describing this CachePool based on the permissions of the calling user.longlonglonggetLimit()longorg.apache.hadoop.fs.permission.FsPermissiongetMode()voidResets statistics related to this CachePoolvoidsetDefaultReplication(short replication) setGroupName(String groupName) setLimit(long bytes) setMaxRelativeExpiryMs(long expiry) setMode(org.apache.hadoop.fs.permission.FsPermission mode) setOwnerName(String ownerName) toString()
-
Method Details
-
getPoolName
-
getOwnerName
-
setOwnerName
-
getGroupName
-
setGroupName
-
getMode
public org.apache.hadoop.fs.permission.FsPermission getMode() -
setMode
-
getLimit
public long getLimit() -
setLimit
-
getDefaultReplication
public short getDefaultReplication() -
setDefaultReplication
public void setDefaultReplication(short replication) -
getMaxRelativeExpiryMs
public long getMaxRelativeExpiryMs() -
setMaxRelativeExpiryMs
-
resetStatistics
public void resetStatistics()Resets statistics related to this CachePool -
addBytesNeeded
public void addBytesNeeded(long bytes) -
addBytesCached
public void addBytesCached(long bytes) -
addFilesNeeded
public void addFilesNeeded(long files) -
addFilesCached
public void addFilesCached(long files) -
getBytesNeeded
public long getBytesNeeded() -
getBytesCached
public long getBytesCached() -
getBytesOverlimit
public long getBytesOverlimit() -
getFilesNeeded
public long getFilesNeeded() -
getFilesCached
public long getFilesCached() -
getEntry
Returns a CachePoolInfo describing this CachePool based on the permissions of the calling user. Unprivileged users will see only minimal descriptive information about the pool.- Parameters:
pc- Permission checker to be used to validate the user's permissions, or null- Returns:
- CachePoolEntry describing this CachePool
-
toString
-
getDirectiveList
-