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>
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
uriFields inherited from class io.deephaven.engine.table.impl.locations.impl.PartitionedTableLocationKey
partitionsFields inherited from interface io.deephaven.engine.table.impl.locations.ImmutableTableLocationKey
ZERO_LENGTH_IMMUTABLE_TABLE_LOCATION_KEY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionParquetTableLocationKey(@NotNull File file, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedfileandpartitions.ParquetTableLocationKey(@NotNull URI parquetFileUri, int order, @Nullable Map<String, Comparable<?>> partitions, @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedparquetFileUriandpartitions. -
Method Summary
Modifier and TypeMethodDescriptionGet a name for the implementing class.org.apache.parquet.hadoop.metadata.ParquetMetadataint[]Get previously-setor on-demand createdRowGroupindices for this location key's currentParquetFileReader.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()booleanReturnstrueif a previousParquetFileReaderhas been created, or if one was successfully created on-demand.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 File file, int order, @Nullable @Nullable Map<String, Comparable<?>> partitions, @NotNull @NotNull ParquetInstructions readInstructions) Construct a new ParquetTableLocationKey for the suppliedfileandpartitions.- Parameters:
file- 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) 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
-
-
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
-
verifyFileReader
public boolean verifyFileReader()Returnstrueif a previousParquetFileReaderhas been created, or if one was successfully created on-demand.When
false, this may mean that the file:- does not exist, or is otherwise inaccessible
- is in the process of being written, and is not yet a valid parquet file
- is _not_ a parquet file
- is a corrupt parquet file
ParquetTools.getParquetFileReaderChecked(URI, ParquetInstructions).- Returns:
- true if the file reader exists or was successfully created
-
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
-
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
-