Class S3TransactionLogSynchronizer
- java.lang.Object
-
- io.trino.plugin.deltalake.transactionlog.writer.S3TransactionLogSynchronizer
-
- All Implemented Interfaces:
TransactionLogSynchronizer
public class S3TransactionLogSynchronizer extends Object implements TransactionLogSynchronizer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classS3TransactionLogSynchronizer.LockFileContents
-
Field Summary
Fields Modifier and Type Field Description static io.airlift.log.LoggerLOG
-
Constructor Summary
Constructors Constructor Description S3TransactionLogSynchronizer(HdfsEnvironment hdfsEnvironment, io.airlift.json.JsonCodec<S3TransactionLogSynchronizer.LockFileContents> lockFileContentesCodec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisUnsafe()Whether or not writes using this Synchronizer need to be enabled with the "delta.enable-non-concurrent-writes" config property.static StringparseEntryFilename(String lockFilename)voidwrite(ConnectorSession session, String clusterId, org.apache.hadoop.fs.Path newLogEntryPath, byte[] entryContents)Performs atomic write of transaction log entry file.
-
-
-
Constructor Detail
-
S3TransactionLogSynchronizer
@Inject public S3TransactionLogSynchronizer(HdfsEnvironment hdfsEnvironment, io.airlift.json.JsonCodec<S3TransactionLogSynchronizer.LockFileContents> lockFileContentesCodec)
-
-
Method Detail
-
isUnsafe
public boolean isUnsafe()
Description copied from interface:TransactionLogSynchronizerWhether or not writes using this Synchronizer need to be enabled with the "delta.enable-non-concurrent-writes" config property.- Specified by:
isUnsafein interfaceTransactionLogSynchronizer- Returns:
- False if collision detection for writes from multiple clusters is supported, else true.
-
write
public void write(ConnectorSession session, String clusterId, org.apache.hadoop.fs.Path newLogEntryPath, byte[] entryContents)
Description copied from interface:TransactionLogSynchronizerPerforms atomic write of transaction log entry file.- Specified by:
writein interfaceTransactionLogSynchronizer
-
-