Class CachePool

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.CachePool

@Private public final class CachePool extends Object
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.
  • Method Details

    • getPoolName

      public String getPoolName()
    • getOwnerName

      public String getOwnerName()
    • setOwnerName

      public CachePool setOwnerName(String ownerName)
    • getGroupName

      public String getGroupName()
    • setGroupName

      public CachePool setGroupName(String groupName)
    • getMode

      public org.apache.hadoop.fs.permission.FsPermission getMode()
    • setMode

      public CachePool setMode(org.apache.hadoop.fs.permission.FsPermission mode)
    • getLimit

      public long getLimit()
    • setLimit

      public CachePool setLimit(long bytes)
    • getDefaultReplication

      public short getDefaultReplication()
    • setDefaultReplication

      public void setDefaultReplication(short replication)
    • getMaxRelativeExpiryMs

      public long getMaxRelativeExpiryMs()
    • setMaxRelativeExpiryMs

      public CachePool setMaxRelativeExpiryMs(long expiry)
    • 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

      public org.apache.hadoop.hdfs.protocol.CachePoolEntry getEntry(FSPermissionChecker pc)
      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

      public String toString()
      Overrides:
      toString in class Object
    • getDirectiveList

      public CachePool.DirectiveList getDirectiveList()