@Internal public class CompactOperator<T> extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<PartitionCommitInfo> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<CompactMessages.CoordinatorOutput,PartitionCommitInfo>, org.apache.flink.streaming.api.operators.BoundedOneInput
Use BulkFormat to read and use BucketWriter to write.
STATE: This operator stores expired files in state, after the checkpoint completes successfully, We can ensure that these files will not be used again and they can be deleted from the file system.
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
COMPACTED_PREFIX |
static String |
UNCOMPACTED_PREFIX |
| 构造器和说明 |
|---|
CompactOperator(org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.FileSystem,IOException> fsFactory,
CompactReader.Factory<T> readerFactory,
CompactWriter.Factory<T> writerFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.apache.flink.core.fs.Path |
convertFromUncompacted(org.apache.flink.core.fs.Path path) |
static String |
convertToUncompacted(String path) |
void |
endInput() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
notifyCheckpointComplete(long checkpointId) |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<CompactMessages.CoordinatorOutput> 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, open, prepareSnapshotPreBarrier, 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 CompactOperator(org.apache.flink.util.function.SupplierWithException<org.apache.flink.core.fs.FileSystem,IOException> fsFactory, CompactReader.Factory<T> readerFactory, CompactWriter.Factory<T> writerFactory)
public 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<PartitionCommitInfo>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<CompactMessages.CoordinatorOutput> element) throws Exception
processElement 在接口中 org.apache.flink.streaming.api.operators.Input<CompactMessages.CoordinatorOutput>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<PartitionCommitInfo>Exceptionpublic void notifyCheckpointComplete(long checkpointId)
throws Exception
notifyCheckpointComplete 在接口中 org.apache.flink.api.common.state.CheckpointListenernotifyCheckpointComplete 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<PartitionCommitInfo>Exceptionpublic void endInput()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionpublic static org.apache.flink.core.fs.Path convertFromUncompacted(org.apache.flink.core.fs.Path path)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.