public abstract class AbstractStreamingWriter<IN,OUT>
extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<OUT>
implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<IN,OUT>, org.apache.flink.streaming.api.operators.BoundedOneInput
StreamingFileSink. It can send
file and bucket information to downstream.| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.flink.streaming.api.functions.sink.filesystem.Buckets<IN,String> |
buckets |
protected long |
currentWatermark |
| 构造器和说明 |
|---|
AbstractStreamingWriter(long bucketCheckInterval,
org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.BucketsBuilder<IN,String,? extends org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.BucketsBuilder<IN,String,?>> bucketsBuilder) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected void |
commitUpToCheckpoint(long checkpointId)
Commit up to this checkpoint id.
|
void |
endInput() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
notifyCheckpointComplete(long checkpointId) |
protected abstract void |
onPartFileOpened(String partition,
org.apache.flink.core.fs.Path newPath)
Notifies a new file has been opened.
|
protected abstract void |
partitionCreated(String partition)
Notifies a partition created.
|
protected abstract void |
partitionInactive(String partition)
Notifies a partition become inactive.
|
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) |
void |
processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) |
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, open, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, setup, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected transient org.apache.flink.streaming.api.functions.sink.filesystem.Buckets<IN,String> buckets
protected transient long currentWatermark
public AbstractStreamingWriter(long bucketCheckInterval,
org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.BucketsBuilder<IN,String,? extends org.apache.flink.streaming.api.functions.sink.filesystem.StreamingFileSink.BucketsBuilder<IN,String,?>> bucketsBuilder)
protected abstract void partitionCreated(String partition)
protected abstract void partitionInactive(String partition)
protected abstract void onPartFileOpened(String partition, org.apache.flink.core.fs.Path newPath)
Note that this does not mean that the file has been created in the file system. It is only created logically and the actual file will be generated after it is committed.
protected void commitUpToCheckpoint(long checkpointId)
throws Exception
Exceptionpublic void initializeState(org.apache.flink.runtime.state.StateInitializationContext context)
throws Exception
public void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context)
throws Exception
public void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)
throws Exception
public void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<IN> element) throws Exception
public void notifyCheckpointComplete(long checkpointId)
throws Exception
public void endInput()
throws Exception
endInput 在接口中 org.apache.flink.streaming.api.operators.BoundedOneInputExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.