Class ExtendedBucketStreamWriteFunction
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.ProcessFunction<I,O>
-
- org.apache.hudi.adapter.ProcessFunctionAdapter<I,org.apache.flink.table.data.RowData>
-
- org.apache.hudi.sink.common.AbstractWriteFunction<I>
-
- org.apache.hudi.sink.common.AbstractStreamWriteFunction<org.apache.hudi.client.model.HoodieFlinkInternalRow>
-
- org.apache.hudi.sink.StreamWriteFunction
-
- org.apache.hudi.sink.bucket.BucketStreamWriteFunction
-
- org.apache.flink.cdc.connectors.hudi.sink.function.ExtendedBucketStreamWriteFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,org.apache.flink.streaming.api.checkpoint.CheckpointedFunction,org.apache.flink.streaming.api.operators.BoundedOneInput
public class ExtendedBucketStreamWriteFunction extends org.apache.hudi.sink.bucket.BucketStreamWriteFunctionExtended version ofBucketStreamWriteFunctionthat exposes a public setter for the checkpoint ID.This class is necessary because the parent class's
checkpointIdfield is protected and inaccessible from composition-based multi-table write functions. In a multi-table CDC sink, each table requires its own write function instance, and these instances must be updated with the current checkpoint ID for proper coordinator communication during checkpointing.The public
setCheckpointId(long)method provides a clean API for parent write functions to update the checkpoint ID without resorting to reflection-based access.- See Also:
BucketStreamWriteFunction,MultiTableEventStreamWriteFunction, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExtendedBucketStreamWriteFunction(org.apache.flink.configuration.Configuration config, org.apache.flink.table.types.logical.RowType rowType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetCheckpointId(long checkpointId)Sets the checkpoint ID for this write function.-
Methods inherited from class org.apache.hudi.sink.bucket.BucketStreamWriteFunction
initializeState, isBucketToLoad, open, processElement, snapshotState
-
Methods inherited from class org.apache.hudi.sink.StreamWriteFunction
bufferRecord, close, deduplicateRecordsIfNeeded, endInput, flushRemaining, getDataBuffer, writeRecords
-
Methods inherited from class org.apache.hudi.sink.common.AbstractStreamWriteFunction
getCorrespondent, getOperatorEventGateway, handleOperatorEvent, instantToWrite, setCorrespondent, setOperatorEventGateway, snapshotState
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
-
-
-
Method Detail
-
setCheckpointId
public void setCheckpointId(long checkpointId)
Sets the checkpoint ID for this write function.This method provides public access to update the protected
checkpointIdfield inherited from the parent class. The checkpoint ID is required for the write function to properly communicate with the coordinator during checkpoint operations.- Parameters:
checkpointId- the checkpoint ID to set
-
-