Class TransactionLogAccess
java.lang.Object
io.trino.plugin.deltalake.transactionlog.TransactionLogAccess
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionLogAccess(TypeManager typeManager, CheckpointSchemaManager checkpointSchemaManager, DeltaLakeConfig deltaLakeConfig, io.trino.plugin.hive.FileFormatDataSourceStats fileFormatDataSourceStats, TrinoFileSystemFactory fileSystemFactory, io.trino.plugin.hive.parquet.ParquetReaderConfig parquetReaderConfig) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcanonicalizeColumnName(String columnName) static List<DeltaLakeColumnMetadata>columnsWithStats(MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TypeManager typeManager) static com.google.common.collect.ImmutableList<DeltaLakeColumnMetadata>columnsWithStats(List<DeltaLakeColumnMetadata> schema, List<String> partitionColumns) voidgetActiveFiles(TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, ConnectorSession session) Deprecated.getActiveFiles(TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Optional<Set<DeltaLakeColumnHandle>> projectedColumns, ConnectorSession session) getCommitInfoEntries(TableSnapshot tableSnapshot, ConnectorSession session) io.airlift.jmx.CacheStatsMBeangetJsonEntries(TrinoFileSystem fileSystem, String transactionLogDir, List<Long> forVersions) io.airlift.jmx.CacheStatsMBeangetMetadataEntry(TableSnapshot tableSnapshot, ConnectorSession session) getPastTableVersions(TrinoFileSystem fileSystem, String transactionLogDir, Instant startAt, long lastVersion) Returns a stream of transaction log versions betweenstartAtpoint in time andlastVersion.getProtocolEntries(TableSnapshot tableSnapshot, ConnectorSession session) getProtocolEntry(ConnectorSession session, TableSnapshot tableSnapshot) getRemoveEntries(TableSnapshot tableSnapshot, ConnectorSession session) getTransactionLogEntries(ConnectorSession session, TableSnapshot tableSnapshot, Set<CheckpointEntryIterator.EntryType> entryTypes, Function<Stream<DeltaLakeTransactionLogEntry>, Stream<Object>> entryMapper) voidinvalidateCache(SchemaTableName schemaTableName, Optional<String> tableLocation) loadSnapshot(ConnectorSession session, SchemaTableName table, String tableLocation) 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, io.trino.plugin.hive.FileFormatDataSourceStats fileFormatDataSourceStats, TrinoFileSystemFactory fileSystemFactory, io.trino.plugin.hive.parquet.ParquetReaderConfig parquetReaderConfig)
-
-
Method Details
-
getDataFileMetadataCacheStats
public io.airlift.jmx.CacheStatsMBean getDataFileMetadataCacheStats() -
getMetadataCacheStats
public io.airlift.jmx.CacheStatsMBean getMetadataCacheStats() -
loadSnapshot
public TableSnapshot loadSnapshot(ConnectorSession session, SchemaTableName table, String tableLocation) throws IOException - Throws:
IOException
-
flushCache
public void flushCache() -
invalidateCache
-
getMetadataEntry
-
getActiveFiles
@Deprecated public List<AddFileEntry> getActiveFiles(TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, ConnectorSession session) Deprecated. -
getActiveFiles
public List<AddFileEntry> getActiveFiles(TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Optional<Set<DeltaLakeColumnHandle>> projectedColumns, ConnectorSession session) -
columnsWithStats
public static List<DeltaLakeColumnMetadata> columnsWithStats(MetadataEntry metadataEntry, ProtocolEntry protocolEntry, 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) -
getTransactionLogEntries
public Map<Class<?>,Object> getTransactionLogEntries(ConnectorSession session, TableSnapshot tableSnapshot, Set<CheckpointEntryIterator.EntryType> entryTypes, Function<Stream<DeltaLakeTransactionLogEntry>, Stream<Object>> entryMapper) -
getProtocolEntry
-
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, String transactionLogDir, List<Long> forVersions) -
getPastTableVersions
public List<Long> getPastTableVersions(TrinoFileSystem fileSystem, String transactionLogDir, Instant startAt, long lastVersion) Returns a stream of transaction log versions betweenstartAtpoint in time andlastVersion. -
canonicalizeColumnName
-
toCanonicalNameKeyedMap
public static <T> Map<CanonicalColumnName,T> toCanonicalNameKeyedMap(Map<String, T> map, Map<String, CanonicalColumnName> canonicalColumnNames) -
toOriginalNameKeyedMap
Deprecated.
-