T
- type of record to write into FileStore
.public class TableWriteImpl<T> extends Object implements TableWrite
TableWrite
implementation.Modifier and Type | Class and Description |
---|---|
static interface |
TableWriteImpl.RecordExtractor<T>
Extractor to extract
T from the SinkRecord . |
Constructor and Description |
---|
TableWriteImpl(FileStoreWrite<T> write,
SinkRecordConverter recordConverter,
TableWriteImpl.RecordExtractor<T> recordExtractor) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
compact(org.apache.flink.table.data.binary.BinaryRowData partition,
int bucket,
boolean fullCompaction) |
void |
notifyNewFiles(long snapshotId,
org.apache.flink.table.data.binary.BinaryRowData partition,
int bucket,
List<DataFileMeta> files)
Notify that some new files are created at given snapshot in given bucket.
|
List<FileCommittable> |
prepareCommit(boolean blocking,
long commitIdentifier) |
SinkRecord |
toLogRecord(SinkRecord record)
Log record need to preserve original pk (which includes partition fields).
|
TableWrite |
withIOManager(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager) |
TableWrite |
withOverwrite(boolean overwrite) |
SinkRecord |
write(org.apache.flink.table.data.RowData rowData) |
public TableWriteImpl(FileStoreWrite<T> write, SinkRecordConverter recordConverter, TableWriteImpl.RecordExtractor<T> recordExtractor)
public TableWrite withOverwrite(boolean overwrite)
withOverwrite
in interface TableWrite
public TableWrite withIOManager(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager)
withIOManager
in interface TableWrite
public SinkRecord write(org.apache.flink.table.data.RowData rowData) throws Exception
write
in interface TableWrite
Exception
public SinkRecord toLogRecord(SinkRecord record)
TableWrite
toLogRecord
in interface TableWrite
public void compact(org.apache.flink.table.data.binary.BinaryRowData partition, int bucket, boolean fullCompaction) throws Exception
compact
in interface TableWrite
Exception
public void notifyNewFiles(long snapshotId, org.apache.flink.table.data.binary.BinaryRowData partition, int bucket, List<DataFileMeta> files)
TableWrite
Most probably, these files are created by another job. Currently this method is only used by the dedicated compact job to see files created by writer jobs.
notifyNewFiles
in interface TableWrite
public List<FileCommittable> prepareCommit(boolean blocking, long commitIdentifier) throws Exception
prepareCommit
in interface TableWrite
Exception
public void close() throws Exception
close
in interface AutoCloseable
close
in interface TableWrite
Exception
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.