public class MultiTablesStoreCompactOperator extends PrepareCommitOperator<org.apache.flink.table.data.RowData,MultiTableCommittable>
In-coming records are generated by sources built from MultiTablesReadOperator
. The records will contain
partition keys, bucket number, table name and database name.
Modifier and Type | Field and Description |
---|---|
protected Catalog |
catalog |
protected String |
commitUser |
protected Map<Identifier,FileStoreTable> |
tables |
protected Map<Identifier,StoreSinkWrite> |
writes |
memoryPool
Constructor and Description |
---|
MultiTablesStoreCompactOperator(Catalog.Loader catalogLoader,
String initialCommitUser,
org.apache.flink.streaming.api.environment.CheckpointConfig checkpointConfig,
boolean isStreaming,
boolean ignorePreviousFiles,
Options options) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
open() |
protected List<MultiTableCommittable> |
prepareCommit(boolean waitCompaction,
long checkpointId) |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) |
endInput, prepareSnapshotPreBarrier, setup
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, snapshotState, useSplittableTimers
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setKeyContextElement
finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, setKeyContextElement1, setKeyContextElement2, snapshotState
notifyCheckpointAborted, notifyCheckpointComplete
getCurrentKey, setCurrentKey
protected Catalog catalog
protected Map<Identifier,FileStoreTable> tables
protected Map<Identifier,StoreSinkWrite> writes
protected String commitUser
public MultiTablesStoreCompactOperator(Catalog.Loader catalogLoader, String initialCommitUser, org.apache.flink.streaming.api.environment.CheckpointConfig checkpointConfig, boolean isStreaming, boolean ignorePreviousFiles, Options options)
public void initializeState(org.apache.flink.runtime.state.StateInitializationContext context) throws Exception
initializeState
in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
initializeState
in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<MultiTableCommittable>
Exception
public void open() throws Exception
open
in interface org.apache.flink.streaming.api.operators.StreamOperator<MultiTableCommittable>
open
in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<MultiTableCommittable>
Exception
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.table.data.RowData> element) throws Exception
Exception
protected List<MultiTableCommittable> prepareCommit(boolean waitCompaction, long checkpointId) throws IOException
prepareCommit
in class PrepareCommitOperator<org.apache.flink.table.data.RowData,MultiTableCommittable>
IOException
public void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) throws Exception
snapshotState
in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator
snapshotState
in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<MultiTableCommittable>
Exception
public void close() throws Exception
close
in interface org.apache.flink.streaming.api.operators.StreamOperator<MultiTableCommittable>
close
in class PrepareCommitOperator<org.apache.flink.table.data.RowData,MultiTableCommittable>
Exception
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.