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
ConstructorsConstructorDescriptionFileKeyValuePartitionLayout(@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 forbuildersused to organize partition information; as builders are typically stateful, a new builder is created each time thisKeyValuePartitionLayoutis used tofind keyskeyFactory- Factory function used to generate table location keys from target files and partition valuesmaxPartitioningLevels- Maximum partitioning levels to traverse. Must be>= 0.0means only look at files intableRootDirectoryand find no partitions.
-
-
Method Details
-
toString
- Overrides:
toStringin classKeyValuePartitionLayout<TLK extends TableLocationKey,Path>
-
findKeys
Description copied from interface:TableLocationKeyFinderFindkeysand deliver them to thelocationKeyObserver.- Specified by:
findKeysin interfaceTableLocationKeyFinder<TLK extends TableLocationKey>- Parameters:
locationKeyObserver- Per-key callback
-