public class StoreSinkWriteImpl extends Object implements StoreSinkWrite
StoreSinkWrite. This writer does not have states.StoreSinkWrite.Provider, StoreSinkWrite.WithWriteBufferProvider| Modifier and Type | Field and Description |
|---|---|
protected String |
commitUser |
protected StoreSinkWriteState |
state |
protected TableWriteImpl<?> |
write |
| Constructor and Description |
|---|
StoreSinkWriteImpl(FileStoreTable table,
String commitUser,
StoreSinkWriteState state,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
boolean ignorePreviousFiles,
boolean waitCompaction,
boolean isStreamingMode,
MemoryPoolFactory memoryPoolFactory,
org.apache.flink.metrics.MetricGroup metricGroup) |
StoreSinkWriteImpl(FileStoreTable table,
String commitUser,
StoreSinkWriteState state,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
boolean ignorePreviousFiles,
boolean waitCompaction,
boolean isStreamingMode,
MemorySegmentPool memoryPool,
org.apache.flink.metrics.MetricGroup metricGroup) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
compact(BinaryRow partition,
int bucket,
boolean fullCompaction) |
TableWriteImpl<?> |
getWrite() |
void |
notifyNewFiles(long snapshotId,
BinaryRow partition,
int bucket,
List<DataFileMeta> files) |
List<Committable> |
prepareCommit(boolean waitCompaction,
long checkpointId) |
void |
replace(FileStoreTable newTable)
Replace the internal
TableWriteImpl with the one provided by newWriteProvider. |
void |
snapshotState() |
boolean |
streamingMode() |
SinkRecord |
toLogRecord(SinkRecord record) |
void |
withCompactExecutor(ExecutorService compactExecutor) |
void |
withInsertOnly(boolean insertOnly)
This method is called when the insert only status of the records changes.
|
SinkRecord |
write(InternalRow rowData) |
SinkRecord |
write(InternalRow rowData,
int bucket) |
protected final String commitUser
protected final StoreSinkWriteState state
protected TableWriteImpl<?> write
public StoreSinkWriteImpl(FileStoreTable table, String commitUser, StoreSinkWriteState state, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, boolean ignorePreviousFiles, boolean waitCompaction, boolean isStreamingMode, @Nullable MemorySegmentPool memoryPool, @Nullable org.apache.flink.metrics.MetricGroup metricGroup)
public StoreSinkWriteImpl(FileStoreTable table, String commitUser, StoreSinkWriteState state, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, boolean ignorePreviousFiles, boolean waitCompaction, boolean isStreamingMode, MemoryPoolFactory memoryPoolFactory, @Nullable org.apache.flink.metrics.MetricGroup metricGroup)
public void withCompactExecutor(ExecutorService compactExecutor)
public void withInsertOnly(boolean insertOnly)
StoreSinkWritewithInsertOnly in interface StoreSinkWriteinsertOnly - If true, all the following records would be of RowKind.INSERT, and no two records would have the same primary
key.@Nullable public SinkRecord write(InternalRow rowData) throws Exception
write in interface StoreSinkWriteException@Nullable public SinkRecord write(InternalRow rowData, int bucket) throws Exception
write in interface StoreSinkWriteExceptionpublic SinkRecord toLogRecord(SinkRecord record)
toLogRecord in interface StoreSinkWritepublic void compact(BinaryRow partition, int bucket, boolean fullCompaction) throws Exception
compact in interface StoreSinkWriteExceptionpublic void notifyNewFiles(long snapshotId,
BinaryRow partition,
int bucket,
List<DataFileMeta> files)
notifyNewFiles in interface StoreSinkWritepublic List<Committable> prepareCommit(boolean waitCompaction, long checkpointId) throws IOException
prepareCommit in interface StoreSinkWriteIOExceptionpublic void snapshotState()
throws Exception
snapshotState in interface StoreSinkWriteExceptionpublic boolean streamingMode()
streamingMode in interface StoreSinkWritepublic void close()
throws Exception
close in interface StoreSinkWriteExceptionpublic void replace(FileStoreTable newTable) throws Exception
StoreSinkWriteTableWriteImpl with the one provided by newWriteProvider. The state of the old TableWriteImpl will also be transferred to
the new TableWriteImpl by TableWriteImpl.checkpoint() and TableWriteImpl.restore(List).
Currently, this method is only used by CDC sinks because they need to deal with schema
changes. TableWriteImpl with the new schema will be provided by newWriteProvider.
replace in interface StoreSinkWriteException@VisibleForTesting public TableWriteImpl<?> getWrite()
Copyright © 2023–2025 The Apache Software Foundation. All rights reserved.