Class CacheManagerOptions.Builder

java.lang.Object
org.apache.datafusion.CacheManagerOptions.Builder
Enclosing class:
CacheManagerOptions

public static final class CacheManagerOptions.Builder extends Object
Builder for CacheManagerOptions.
  • Method Details

    • fileMetadataCache

      public CacheManagerOptions.Builder fileMetadataCache(long maxBytes)
      Enable the file-embedded metadata cache (parquet footers, page metadata) with the given byte cap. The cap is the budget the upstream DefaultFilesMetadataCache uses to evict entries; 0 is legal and means "construct the cache but with a 0-byte budget" (effectively disabled but observable in stats).
      Throws:
      IllegalArgumentException - if maxBytes is negative.
    • listFilesCache

      public CacheManagerOptions.Builder listFilesCache(long maxBytes, Duration ttl)
      Enable the list-files cache with the given byte cap and TTL. Pass null for ttl to use upstream's "no expiration" semantics (entries are evicted only by capacity pressure).
      Throws:
      IllegalArgumentException - if maxBytes is negative or ttl is negative.
    • fileStatisticsCache

      public CacheManagerOptions.Builder fileStatisticsCache(boolean enabled)
      Enable the file-statistics cache (per-file row counts / column statistics). When enabled is true, the upstream DefaultFileStatisticsCache is installed. When false, the slot is explicitly set to disabled in the wire format — the same end-state as never calling this setter, but distinguishable for testing.
    • build

      public CacheManagerOptions build()