@Internal public class CompactorOperator extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<CompactorRequest,org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>, org.apache.flink.streaming.api.operators.BoundedOneInput, org.apache.flink.api.common.state.CheckpointListener
FileSink.
Requests received from the CompactCoordinator will firstly be held in memory, and
snapshot into the state of a checkpoint. When the checkpoint is successfully completed, all
requests received before can be submitted. The results can be emitted at the next prepareSnapshotPreBarrier(long) invoking after the compaction is finished, to ensure that committers
can receive only one CommittableSummary and the corresponding number of Committable for a single
checkpoint.
| 构造器和说明 |
|---|
CompactorOperator(FileCompactStrategy strategy,
org.apache.flink.core.io.SimpleVersionedSerializer<FileSinkCommittable> committableSerializer,
FileCompactor fileCompactor,
org.apache.flink.streaming.api.functions.sink.filesystem.BucketWriter<?,String> bucketWriter) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
endInput() |
CompletableFuture<?> |
getAllTasksFuture() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
notifyCheckpointComplete(long checkpointId) |
void |
open() |
void |
prepareSnapshotPreBarrier(long checkpointId) |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<CompactorRequest> element) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) |
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, 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, waitpublic CompactorOperator(FileCompactStrategy strategy, org.apache.flink.core.io.SimpleVersionedSerializer<FileSinkCommittable> committableSerializer, FileCompactor fileCompactor, org.apache.flink.streaming.api.functions.sink.filesystem.BucketWriter<?,String> bucketWriter)
public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>open 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<CompactorRequest> element) throws Exception
processElement 在接口中 org.apache.flink.streaming.api.operators.Input<CompactorRequest>Exceptionpublic void endInput()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic void notifyCheckpointComplete(long checkpointId)
throws Exception
notifyCheckpointComplete 在接口中 org.apache.flink.api.common.state.CheckpointListenernotifyCheckpointComplete 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exceptionpublic void prepareSnapshotPreBarrier(long checkpointId)
throws Exception
prepareSnapshotPreBarrier 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>prepareSnapshotPreBarrier 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>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<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>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<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exceptionpublic void close()
throws Exception
close 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>close 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<FileSinkCommittable>>Exception@VisibleForTesting public CompletableFuture<?> getAllTasksFuture()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.