Class FileKeyValuePartitionLayout<TLK extends TableLocationKey>

java.lang.Object
io.deephaven.engine.table.impl.locations.local.KeyValuePartitionLayout<TLK,Path>
io.deephaven.engine.table.impl.locations.local.FileKeyValuePartitionLayout<TLK>
All Implemented Interfaces:
TableLocationKeyFinder<TLK>

public class FileKeyValuePartitionLayout<TLK extends TableLocationKey> extends KeyValuePartitionLayout<TLK,Path> implements TableLocationKeyFinder<TLK>
Location finder that will take a directory file, traverse the directory hierarchy and infer partitions from key-value pairs in the directory names, for example:
 tableRootDirectory/Country=France/City=Paris/parisData.parquet
 
Traversal is depth-first, and assumes that target files will only be found at a single depth. This class is specialized for handling of files. For handling of URIs, see URIStreamKeyValuePartitionLayout.
ImplNote:
Column names will be legalized via NameValidator.legalizeColumnName(String, Set).
  • Constructor Details

    • FileKeyValuePartitionLayout

      public FileKeyValuePartitionLayout(@NotNull @NotNull File tableRootDirectory, @NotNull @NotNull Predicate<Path> pathFilter, @NotNull @NotNull Supplier<KeyValuePartitionLayout.LocationTableBuilder> locationTableBuilderFactory, @NotNull @NotNull BiFunction<Path,Map<String,Comparable<?>>,TLK> keyFactory, int maxPartitioningLevels)
      Parameters:
      tableRootDirectory - The directory to traverse from
      pathFilter - Filter to determine whether a regular file should be used to create a key
      locationTableBuilderFactory - Factory for builders used to organize partition information; as builders are typically stateful, a new builder is created each time this KeyValuePartitionLayout is used to find keys
      keyFactory - Factory function used to generate table location keys from target files and partition values
      maxPartitioningLevels - Maximum partitioning levels to traverse. Must be >= 0. 0 means only look at files in tableRootDirectory and find no partitions.
  • Method Details