Interface HardwoodContext

All Superinterfaces:
AutoCloseable

public interface HardwoodContext extends AutoCloseable

Context object that manages shared resources for Parquet file reading.

Holds the thread pool for parallel page decoding, the libdeflate decompressor pool for native GZIP decompression, the decompressor factory, and the MetadataSource installed through builder(), if any.

The context lifecycle is tied to either:

  • Method Details

    • executor

      ExecutorService executor()
      Get the executor service for parallel operations.
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • create

      static HardwoodContext create()
      Create a new context with a thread pool sized to available processors.
    • create

      static HardwoodContext create(int threads)
      Create a new context with a thread pool of the specified size.
    • builder

      Starts building a context.

      try (HardwoodContext context = HardwoodContext.builder()
              .threads(16)
              .metadataSource(source)
              .build()) {
          // every reader opened against context takes its footers from source
      }