public class CleanFunction<T>
extends org.apache.flink.api.common.functions.AbstractRichFunction
implements org.apache.flink.streaming.api.functions.sink.SinkFunction<T>, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.api.common.state.CheckpointListener
It starts a cleaning task on new checkpoints, there is only one cleaning task at a time, a new task can not be scheduled until the last task finished(fails or normally succeed). The cleaning task never expects to throw but only log.
| Modifier and Type | Field and Description |
|---|---|
protected HoodieFlinkWriteClient |
writeClient |
| Constructor and Description |
|---|
CleanFunction(org.apache.flink.configuration.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
void |
notifyCheckpointComplete(long l) |
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) |
getIterationRuntimeContext, getRuntimeContext, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected HoodieFlinkWriteClient writeClient
public CleanFunction(org.apache.flink.configuration.Configuration conf)
public void open(org.apache.flink.configuration.Configuration parameters)
throws Exception
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class org.apache.flink.api.common.functions.AbstractRichFunctionExceptionpublic void notifyCheckpointComplete(long l)
throws Exception
notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListenerExceptionpublic void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context)
throws Exception
snapshotState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionpublic void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)
throws Exception
initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunctionExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.