I - the input typepublic class BucketStreamWriteFunction<I> extends StreamWriteFunction<I>
The task holds a fresh new local index: {(partition + bucket number) &rarr fileId} mapping, this index is used for deciding whether the incoming records in an UPDATE or INSERT. The index is local because different partition paths have separate items in the index.
StreamWriteFunction.DataBucketwriteFunctionconfig, confirming, currentInstant, eventGateway, metaClient, taskID, writeClient, writeStatuses| Constructor and Description |
|---|
BucketStreamWriteFunction(org.apache.flink.configuration.Configuration config)
Constructs a BucketStreamWriteFunction.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) |
boolean |
isBucketToLoad(int bucketNumber,
String partition)
Determine whether the current fileID belongs to the current task.
|
void |
open(org.apache.flink.configuration.Configuration parameters) |
void |
processElement(I i,
org.apache.flink.streaming.api.functions.ProcessFunction.Context context,
org.apache.flink.util.Collector<Object> collector) |
void |
snapshotState() |
bufferRecord, close, endInput, getDataBuffer, writeBuckethandleOperatorEvent, instantToWrite, isConfirming, lastPendingInstant, sendBootstrapEvent, setOperatorEventGateway, snapshotStatepublic BucketStreamWriteFunction(org.apache.flink.configuration.Configuration config)
config - The config optionspublic void open(org.apache.flink.configuration.Configuration parameters)
throws IOException
open in interface org.apache.flink.api.common.functions.RichFunctionopen in class StreamWriteFunction<I>IOExceptionpublic void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context)
throws Exception
initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunctioninitializeState in class AbstractStreamWriteFunction<I>Exceptionpublic void snapshotState()
snapshotState in class StreamWriteFunction<I>public void processElement(I i, org.apache.flink.streaming.api.functions.ProcessFunction.Context context, org.apache.flink.util.Collector<Object> collector) throws Exception
processElement in class StreamWriteFunction<I>Exceptionpublic boolean isBucketToLoad(int bucketNumber,
String partition)
Copyright © 2023 The Apache Software Foundation. All rights reserved.