Class DfsBlockCacheConfig


  • public class DfsBlockCacheConfig
    extends java.lang.Object
    Configuration parameters for DfsBlockCache.
    • Field Detail

      • KB

        public static final int KB
        1024 (number of bytes in one kibibyte/kilobyte)
        See Also:
        Constant Field Values
      • MB

        public static final int MB
        1024 KB (number of bytes in one mebibyte/megabyte)
        See Also:
        Constant Field Values
    • Constructor Detail

      • DfsBlockCacheConfig

        public DfsBlockCacheConfig()
        Create a default configuration.
    • Method Detail

      • getBlockLimit

        public long getBlockLimit()
        Returns:
        maximum number bytes of heap memory to dedicate to caching pack file data. Default is 32 MB.
      • setBlockLimit

        public DfsBlockCacheConfig setBlockLimit​(long newLimit)
        Parameters:
        newLimit - maximum number bytes of heap memory to dedicate to caching pack file data.
        Returns:
        this
      • getBlockSize

        public int getBlockSize()
        Returns:
        size in bytes of a single window mapped or read in from the pack file. Default is 64 KB.
      • setBlockSize

        public DfsBlockCacheConfig setBlockSize​(int newSize)
        Parameters:
        newSize - size in bytes of a single window read in from the pack file.
        Returns:
        this
      • fromConfig

        public DfsBlockCacheConfig fromConfig​(Config rc)
        Update properties by setting fields from the configuration.

        If a property is not defined in the configuration, then it is left unmodified.

        Parameters:
        rc - configuration to read properties from.
        Returns:
        this