Class TransactionLogAccess
java.lang.Object
io.trino.plugin.deltalake.transactionlog.TransactionLogAccess
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionLogAccess(TypeManager typeManager, CheckpointSchemaManager checkpointSchemaManager, DeltaLakeConfig deltaLakeConfig, FileFormatDataSourceStats fileFormatDataSourceStats, TrinoFileSystemFactory fileSystemFactory, ParquetReaderConfig parquetReaderConfig) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> StringcanonicalizeColumnName(String columnName) static List<DeltaLakeColumnMetadata>columnsWithStats(MetadataEntry metadataEntry, TypeManager typeManager) static com.google.common.collect.ImmutableList<DeltaLakeColumnMetadata>columnsWithStats(List<DeltaLakeColumnMetadata> schema, List<String> partitionColumns) getActiveFiles(TableSnapshot tableSnapshot, ConnectorSession session) getCommitInfoEntries(TableSnapshot tableSnapshot, ConnectorSession session) io.airlift.jmx.CacheStatsMBeangetJsonEntries(TrinoFileSystem fileSystem, org.apache.hadoop.fs.Path transactionLogDir, List<Long> forVersions) io.airlift.jmx.CacheStatsMBeangetMetadataEntry(TableSnapshot tableSnapshot, ConnectorSession session) getPastTableVersions(TrinoFileSystem fileSystem, org.apache.hadoop.fs.Path transactionLogDir, Instant startAt, long lastVersion) Returns a stream of transaction log versions betweenstartAtpoint in time andlastVersion.getProtocolEntries(TableSnapshot tableSnapshot, ConnectorSession session) getRemoveEntries(TableSnapshot tableSnapshot, ConnectorSession session) voidinvalidateCaches(String tableLocation) loadSnapshot(SchemaTableName table, org.apache.hadoop.fs.Path tableLocation, ConnectorSession session) static <T> Map<CanonicalColumnName,T> toCanonicalNameKeyedMap(Map<String, T> map) static <T> Map<CanonicalColumnName,T> toCanonicalNameKeyedMap(Map<String, T> map, Map<String, CanonicalColumnName> canonicalColumnNames) Deprecated.
-
Constructor Details
-
TransactionLogAccess
@Inject public TransactionLogAccess(TypeManager typeManager, CheckpointSchemaManager checkpointSchemaManager, DeltaLakeConfig deltaLakeConfig, FileFormatDataSourceStats fileFormatDataSourceStats, TrinoFileSystemFactory fileSystemFactory, ParquetReaderConfig parquetReaderConfig)
-
-
Method Details
-
getDataFileMetadataCacheStats
public io.airlift.jmx.CacheStatsMBean getDataFileMetadataCacheStats() -
getMetadataCacheStats
public io.airlift.jmx.CacheStatsMBean getMetadataCacheStats() -
loadSnapshot
public TableSnapshot loadSnapshot(SchemaTableName table, org.apache.hadoop.fs.Path tableLocation, ConnectorSession session) throws IOException - Throws:
IOException
-
invalidateCaches
-
getMetadataEntry
public Optional<MetadataEntry> getMetadataEntry(TableSnapshot tableSnapshot, ConnectorSession session) -
getActiveFiles
-
columnsWithStats
public static List<DeltaLakeColumnMetadata> columnsWithStats(MetadataEntry metadataEntry, TypeManager typeManager) -
columnsWithStats
public static com.google.common.collect.ImmutableList<DeltaLakeColumnMetadata> columnsWithStats(List<DeltaLakeColumnMetadata> schema, List<String> partitionColumns) -
getRemoveEntries
public Stream<RemoveFileEntry> getRemoveEntries(TableSnapshot tableSnapshot, ConnectorSession session) -
getProtocolEntries
public Stream<ProtocolEntry> getProtocolEntries(TableSnapshot tableSnapshot, ConnectorSession session) -
getCommitInfoEntries
public Stream<CommitInfoEntry> getCommitInfoEntries(TableSnapshot tableSnapshot, ConnectorSession session) -
getJsonEntries
public Stream<DeltaLakeTransactionLogEntry> getJsonEntries(TrinoFileSystem fileSystem, org.apache.hadoop.fs.Path transactionLogDir, List<Long> forVersions) -
getPastTableVersions
public List<Long> getPastTableVersions(TrinoFileSystem fileSystem, org.apache.hadoop.fs.Path transactionLogDir, Instant startAt, long lastVersion) Returns a stream of transaction log versions betweenstartAtpoint in time andlastVersion. -
canonicalizeColumnName
-
toCanonicalNameKeyedMap
-
toCanonicalNameKeyedMap
public static <T> Map<CanonicalColumnName,T> toCanonicalNameKeyedMap(Map<String, T> map, Map<String, CanonicalColumnName> canonicalColumnNames) -
toOriginalNameKeyedMap
Deprecated.
-