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(ConnectorSession session, TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Predicate<String> addStatsMinMaxColumnFilter) getActiveFiles(ConnectorSession session, TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Set<DeltaLakeColumnHandle> projectedColumns) getCommitInfoEntries(ConnectorSession session, TableSnapshot tableSnapshot) io.airlift.jmx.CacheStatsMBeangetJsonEntries(TrinoFileSystem fileSystem, String transactionLogDir, List<Long> forVersions) io.airlift.jmx.CacheStatsMBeangetMetadataEntry(ConnectorSession session, TableSnapshot tableSnapshot) getPastTableVersions(TrinoFileSystem fileSystem, String transactionLogDir, Instant startAt, long lastVersion) Returns a stream of transaction log versions betweenstartAtpoint in time andlastVersion.getProtocolEntries(ConnectorSession session, TableSnapshot tableSnapshot) getProtocolEntry(ConnectorSession session, TableSnapshot tableSnapshot) getRemoveEntries(ConnectorSession session, TableSnapshot tableSnapshot) 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
public Stream<AddFileEntry> getActiveFiles(ConnectorSession session, TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Set<DeltaLakeColumnHandle> projectedColumns) -
getActiveFiles
public Stream<AddFileEntry> getActiveFiles(ConnectorSession session, TableSnapshot tableSnapshot, MetadataEntry metadataEntry, ProtocolEntry protocolEntry, TupleDomain<DeltaLakeColumnHandle> partitionConstraint, Predicate<String> addStatsMinMaxColumnFilter) -
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(ConnectorSession session, TableSnapshot tableSnapshot) -
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(ConnectorSession session, TableSnapshot tableSnapshot) -
getCommitInfoEntries
public Stream<CommitInfoEntry> getCommitInfoEntries(ConnectorSession session, TableSnapshot tableSnapshot) -
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.
-