@Internal public class CompactCoordinator extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>,CompactorRequest>, org.apache.flink.streaming.api.operators.BoundedOneInput
FileSink.
All committable emitted from the writers are collected and packed into CompactorRequests. The FileCompactStrategy defines when the requests can be fired. When
a firing condition is met, the requests will be sent to the CompactorOperator.
The CompactCoordinator stores the non-fired committable as its state, and may emit a
request at any time. A CompactorOperator must ensure that the ownership of the
committable in a compact request is successfully handed from the coordinator, before it can
actually perform the compaction.
| Constructor and Description |
|---|
CompactCoordinator(FileCompactStrategy strategy,
org.apache.flink.core.io.SimpleVersionedSerializer<FileSinkCommittable> committableSerializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
endInput() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
prepareSnapshotPreBarrier(long checkpointId) |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>> element) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) |
close, 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, open, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, useSplittableTimersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetKeyContextElementclose, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, open, setKeyContextElement1, setKeyContextElement2, snapshotStatenotifyCheckpointAborted, notifyCheckpointCompletegetCurrentKey, setCurrentKeypublic CompactCoordinator(FileCompactStrategy strategy, org.apache.flink.core.io.SimpleVersionedSerializer<FileSinkCommittable> committableSerializer)
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>> element) throws Exception
processElement in interface org.apache.flink.streaming.api.operators.Input<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exceptionpublic void endInput()
throws Exception
endInput in interface org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic void prepareSnapshotPreBarrier(long checkpointId)
throws Exception
prepareSnapshotPreBarrier in interface org.apache.flink.streaming.api.operators.StreamOperator<CompactorRequest>prepareSnapshotPreBarrier in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>Exceptionpublic void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context)
throws Exception
snapshotState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorsnapshotState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>Exceptionpublic void initializeState(org.apache.flink.runtime.state.StateInitializationContext context)
throws Exception
initializeState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorinitializeState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>ExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.