@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.
| 构造器和说明 |
|---|
CompactCoordinator(FileCompactStrategy strategy,
org.apache.flink.core.io.SimpleVersionedSerializer<FileSinkCommittable> committableSerializer) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, getTimeServiceManager, getUserCodeClassloader, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, open, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, finish, getMetricGroup, getOperatorID, initializeState, open, setKeyContextElement1, setKeyContextElement2, snapshotStatepublic 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 在接口中 org.apache.flink.streaming.api.operators.Input<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exceptionpublic void endInput()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic void prepareSnapshotPreBarrier(long checkpointId)
throws Exception
prepareSnapshotPreBarrier 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<CompactorRequest>prepareSnapshotPreBarrier 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>Exceptionpublic void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context)
throws Exception
snapshotState 在接口中 org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorsnapshotState 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>Exceptionpublic void initializeState(org.apache.flink.runtime.state.StateInitializationContext context)
throws Exception
initializeState 在接口中 org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorinitializeState 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<CompactorRequest>ExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.