Class ParquetTableLocationKey
java.lang.Object
io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
io.deephaven.engine.table.impl.locations.local.URITableLocationKey
io.deephaven.parquet.table.location.ParquetTableLocationKey
- All Implemented Interfaces:
LogOutputAppendable
,ImmutableTableLocationKey
,TableLocationKey
,NamedImplementation
,Comparable<TableLocationKey>
- Direct Known Subclasses:
IcebergTableParquetLocationKey
TableLocationKey
implementation for use with data stored in the parquet format.-
Nested Class Summary
Nested classes/interfaces inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
PartitionedTableLocationKey.PartitionsComparator, PartitionedTableLocationKey.PartitionsFormatter
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.locations.local.URITableLocationKey
uri
Fields inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
partitions
Fields inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
ZERO_LENGTH_IMMUTABLE_TABLE_LOCATION_KEY_ARRAY
-
Constructor Summary
ConstructorDescriptionParquetTableLocationKey
(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedparquetFileUri
andpartitions
.ParquetTableLocationKey
(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions, @NotNull SeekableChannelsProvider channelsProvider) Construct a new ParquetTableLocationKey for the suppliedparquetFileUri
andpartitions
. -
Method Summary
Modifier and TypeMethodDescriptionGet a name for the implementing class.org.apache.parquet.hadoop.metadata.ParquetMetadata
int[]
Get previously-set
or on-demand createdRowGroup
indices for this location key's currentParquetFileReader
.void
setFileReader
(ParquetFileReader fileReader) Set theParquetFileReader
that will be returned bygetFileReader()
.void
setMetadata
(org.apache.parquet.hadoop.metadata.ParquetMetadata metadata) Set theParquetMetadata
that will be returned bygetMetadata()
()}.void
setRowGroupIndices
(int[] rowGroupIndices) Set theRowGroup
indices that will be returned bygetRowGroupIndices()
Methods inherited from class io.deephaven.engine.table.impl.locations.local.URITableLocationKey
append, compareTo, equals, getURI, hashCode, toString
Methods inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
getPartitionKeys, getPartitionValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
makeImmutable
-
Constructor Details
-
ParquetTableLocationKey
public ParquetTableLocationKey(@NotNull @NotNull URI parquetFileUri, int order, @Nullable @Nullable Map<String, Comparable<?>> partitions, @NotNull @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedparquetFileUri
andpartitions
.This constructor will create a new
SeekableChannelsProvider
for reading the file. If you have multiple location keys that should share a provider, use the other constructor and set the provider manually.- Parameters:
parquetFileUri
- The parquet file that backs the keyed location. Will be adjusted to an absolute path.order
- Explicit ordering index, taking precedence over other fieldspartitions
- The table partitions enclosing the table location keyed bythis
. Note that if this parameter isnull
, the location will be a member of no partitions. An ordered copy of the map will be made, so the calling code is free to mutate the map after this callreadInstructions
- the instructions for customizations while reading
-
ParquetTableLocationKey
public ParquetTableLocationKey(@NotNull @NotNull URI parquetFileUri, int order, @Nullable @Nullable Map<String, Comparable<?>> partitions, @NotNull @NotNull ParquetInstructions readInstructions, @NotNull @NotNull SeekableChannelsProvider channelsProvider) Construct a new ParquetTableLocationKey for the suppliedparquetFileUri
andpartitions
.- Parameters:
parquetFileUri
- The parquet file that backs the keyed location. Will be adjusted to an absolute path.order
- Explicit ordering index, taking precedence over other fieldspartitions
- The table partitions enclosing the table location keyed bythis
. Note that if this parameter isnull
, the location will be a member of no partitions. An ordered copy of the map will be made, so the calling code is free to mutate the map after this callreadInstructions
- the instructions for customizations while readingchannelsProvider
- the provider for reading the file
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementation
Get a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendable
or overridetoString
.The default implementation is correct, but not suitable for high-frequency usage.
- Specified by:
getImplementationName
in interfaceNamedImplementation
- Overrides:
getImplementationName
in classURITableLocationKey
- Returns:
- A name for the implementing class
-
getFileReader
- Returns:
- A
ParquetFileReader
for this location key'sfile
.
-
setFileReader
Set theParquetFileReader
that will be returned bygetFileReader()
. Passnull
to force on-demand construction at the next invocation. Always clears cachedParquetMetadata
andRowGroup
indices.- Parameters:
fileReader
- The newParquetFileReader
-
getMetadata
public org.apache.parquet.hadoop.metadata.ParquetMetadata getMetadata()- Returns:
- A
ParquetMetadata
for this location key'sfile
.
-
setMetadata
public void setMetadata(org.apache.parquet.hadoop.metadata.ParquetMetadata metadata) Set theParquetMetadata
that will be returned bygetMetadata()
()}. Passnull
to force on-demand construction at the next invocation.- Parameters:
metadata
- The newParquetMetadata
-
getRowGroupIndices
public int[] getRowGroupIndices()Get previously-set
or on-demand createdRowGroup
indices for this location key's currentParquetFileReader
.- Returns:
RowGroup
indices for this location key's currentParquetFileReader
.
-
setRowGroupIndices
public void setRowGroupIndices(int[] rowGroupIndices) Set theRowGroup
indices that will be returned bygetRowGroupIndices()
- Parameters:
rowGroupIndices
- The newRowGroup
indices
-