Class URIStreamKeyValuePartitionLayout<TLK extends TableLocationKey>

java.lang.Object
io.deephaven.engine.table.impl.locations.local.KeyValuePartitionLayout<TLK,URI>
io.deephaven.engine.table.impl.locations.local.URIStreamKeyValuePartitionLayout<TLK>
All Implemented Interfaces:
TableLocationKeyFinder<TLK>
Direct Known Subclasses:
ParquetKeyValuePartitionedLayout

public abstract class URIStreamKeyValuePartitionLayout<TLK extends TableLocationKey> extends KeyValuePartitionLayout<TLK,URI>
Extracts a key-value partitioned table layout from a stream of URIs.
  • Field Details

    • tableRootDirectory

      protected final URI tableRootDirectory
  • Constructor Details

    • URIStreamKeyValuePartitionLayout

      protected URIStreamKeyValuePartitionLayout(@NotNull @NotNull URI tableRootDirectory, @NotNull @NotNull Supplier<KeyValuePartitionLayout.LocationTableBuilder> locationTableBuilderFactory, @NotNull @NotNull BiFunction<URI,Map<String,Comparable<?>>,TLK> keyFactory, int maxPartitioningLevels)
      Parameters:
      tableRootDirectory - The directory to traverse from
      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

    • toString

      public String toString()
      Overrides:
      toString in class KeyValuePartitionLayout<TLK extends TableLocationKey,URI>
    • findKeys

      protected final void findKeys(@NotNull @NotNull Stream<URI> uriStream, @NotNull @NotNull Consumer<TLK> locationKeyObserver)
      Find the keys in the given URI stream and notify the observer. Note that the URIs are not expected to have any extra slashes or other path separators. For example, "/a//b/c" in the path is not expected.