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.parquetTraversal 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)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.engine.table.impl.locations.local.KeyValuePartitionLayout
KeyValuePartitionLayout.LocationTableBuilder
-
Constructor Summary
ConstructorDescriptionFileKeyValuePartitionLayout
(@NotNull File tableRootDirectory, @NotNull Predicate<Path> pathFilter, @NotNull Supplier<KeyValuePartitionLayout.LocationTableBuilder> locationTableBuilderFactory, @NotNull BiFunction<Path, Map<String, Comparable<?>>, TLK> keyFactory, int maxPartitioningLevels) -
Method Summary
-
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 frompathFilter
- Filter to determine whether a regular file should be used to create a keylocationTableBuilderFactory
- Factory forbuilders
used to organize partition information; as builders are typically stateful, a new builder is created each time thisKeyValuePartitionLayout
is used tofind keys
keyFactory
- Factory function used to generate table location keys from target files and partition valuesmaxPartitioningLevels
- Maximum partitioning levels to traverse. Must be>= 0
.0
means only look at files intableRootDirectory
and find no partitions.
-
-
Method Details
-
toString
- Overrides:
toString
in classKeyValuePartitionLayout<TLK extends TableLocationKey,
Path>
-
findKeys
Description copied from interface:TableLocationKeyFinder
Findkeys
and deliver them to thelocationKeyObserver
.- Specified by:
findKeys
in interfaceTableLocationKeyFinder<TLK extends TableLocationKey>
- Parameters:
locationKeyObserver
- Per-key callback
-