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
order, uriFields inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
cachedHashCode, partitions -
Constructor Summary
ConstructorsConstructorDescriptionParquetTableLocationKey(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedparquetFileUriandpartitions.ParquetTableLocationKey(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions, @NotNull SeekableChannelsProvider channelsProvider) Deprecated, for removal: This API element is subject to removal in a future version.ParquetTableLocationKey(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull SeekableChannelsProvider channelsProvider) Construct a new ParquetTableLocationKey for the suppliedparquetFileUriandpartitions. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Release any cached data associated with this key.org.apache.parquet.hadoop.metadata.FileMetaDataEquivalent togetMetadata().getFileMetaData().Get a name for the implementing class.org.apache.parquet.hadoop.metadata.ParquetMetadataint[]Get previously-setor on-demand createdRowGroupindices for this location key's currentParquetFileReader.org.apache.parquet.schema.MessageTypeEquivalent togetFileMetadata().getSchema().voidsetFileReader(ParquetFileReader fileReader) Set theParquetFileReaderthat will be returned bygetFileReader().voidsetMetadata(org.apache.parquet.hadoop.metadata.ParquetMetadata metadata) Set theParquetMetadatathat will be returned bygetMetadata().voidsetRowGroupIndices(int[] rowGroupIndices) Set theRowGroupindices that will be returned bygetRowGroupIndices()Methods inherited from class io.deephaven.engine.table.impl.locations.local.URITableLocationKey
append, compareTo, equals, getURI, hashCode, toStringMethods inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
getPartitionKeys, getPartitionValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 suppliedparquetFileUriandpartitions.This constructor will create a new
SeekableChannelsProviderfor 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
@Deprecated(forRemoval=true) public ParquetTableLocationKey(@NotNull @NotNull URI parquetFileUri, int order, @Nullable @Nullable Map<String, Comparable<?>> partitions, @NotNull @NotNull ParquetInstructions readInstructions, @NotNull @NotNull SeekableChannelsProvider channelsProvider) Deprecated, for removal: This API element is subject to removal in a future version.thereadInstructionsparameter is unused, please useParquetTableLocationKey(URI, int, Map, SeekableChannelsProvider)Construct a new ParquetTableLocationKey for the suppliedparquetFileUriandpartitions.- 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, unusedchannelsProvider- the provider for reading the file
-
ParquetTableLocationKey
public ParquetTableLocationKey(@NotNull @NotNull URI parquetFileUri, int order, @Nullable @Nullable Map<String, Comparable<?>> partitions, @NotNull @NotNull SeekableChannelsProvider channelsProvider) Construct a new ParquetTableLocationKey for the suppliedparquetFileUriandpartitions.- 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 callchannelsProvider- the provider for reading the file
-
-
Method Details
-
getImplementationName
Description copied from interface:NamedImplementationGet a name for the implementing class. Useful for abstract classes that implement
LogOutputAppendableor overridetoString.The default implementation is correct, but not suitable for high-frequency usage.
- Specified by:
getImplementationNamein interfaceNamedImplementation- Overrides:
getImplementationNamein classURITableLocationKey- Returns:
- A name for the implementing class
-
getFileReader
- Returns:
- A
ParquetFileReaderfor this location key'sfile.
-
setFileReader
Set theParquetFileReaderthat will be returned bygetFileReader(). Passnullto force on-demand construction at the next invocation. Always clears cachedParquetMetadataandRowGroupindices.- Parameters:
fileReader- The newParquetFileReader
-
getMetadata
public org.apache.parquet.hadoop.metadata.ParquetMetadata getMetadata()- Returns:
- A
ParquetMetadatafor this location key'sfile.
-
setMetadata
public void setMetadata(org.apache.parquet.hadoop.metadata.ParquetMetadata metadata) Set theParquetMetadatathat will be returned bygetMetadata(). Passnullto force on-demand construction at the next invocation.- Parameters:
metadata- The newParquetMetadata
-
getFileMetadata
public org.apache.parquet.hadoop.metadata.FileMetaData getFileMetadata()Equivalent togetMetadata().getFileMetaData().- Returns:
- the file metadata
- See Also:
-
getMetadata()ParquetMetadata.getFileMetaData()
-
getSchema
public org.apache.parquet.schema.MessageType getSchema()Equivalent togetFileMetadata().getSchema().- Returns:
- the file metadata
- See Also:
-
getFileMetadata()FileMetaData.getSchema()
-
getRowGroupIndices
public int[] getRowGroupIndices()Get previously-setor on-demand createdRowGroupindices for this location key's currentParquetFileReader.- Returns:
RowGroupindices for this location key's currentParquetFileReader.
-
setRowGroupIndices
public void setRowGroupIndices(int[] rowGroupIndices) Set theRowGroupindices that will be returned bygetRowGroupIndices()- Parameters:
rowGroupIndices- The newRowGroupindices
-
clear
public void clear()Description copied from interface:TableLocationKeyRelease any cached data associated with this key. Should only be called when this key is no longer associated with any live TableLocation.
-
readInstructionsparameter is unused, please useParquetTableLocationKey(URI, int, Map, SeekableChannelsProvider)