Interface HardwoodContext.Builder

Enclosing interface:
HardwoodContext

@Experimental public static interface HardwoodContext.Builder
Builder for a HardwoodContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the context.
    Installs a MetadataSource that supplies the footer of every file a reader opened against the context reads.
    threads(int threads)
    Sets the number of platform threads the context uses to decompress and decode pages, to parse the footers and page indexes a read reads as it goes and scan dictionaries for a filter's values, and to encode and compress the column chunks of a writer's row groups.
  • Method Details

    • threads

      HardwoodContext.Builder threads(int threads)
      Sets the number of platform threads the context uses to decompress and decode pages, to parse the footers and page indexes a read reads as it goes and scan dictionaries for a filter's values, and to encode and compress the column chunks of a writer's row groups. Defaults to Runtime.availableProcessors(). With zero threads, the context has no pool: that work runs on the threads calling the readers and writers.
      Throws:
      IllegalArgumentException - if threads is negative
    • metadataSource

      HardwoodContext.Builder metadataSource(MetadataSource source)
      Installs a MetadataSource that supplies the footer of every file a reader opened against the context reads. Without one, each reader reads the footers itself.
      Throws:
      NullPointerException - if source is null
    • build

      Builds the context. The caller closes it.