IN - Input typepublic abstract class FileSinkFunction<IN> extends RichSinkFunction<IN> implements org.apache.flink.api.java.typeutils.InputTypeConfigurable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cleanupCalled |
protected int |
currentNumberOfSubtasks |
protected OutputFormat<IN> |
format |
protected int |
indexInSubtaskGroup |
protected ArrayList<IN> |
tupleList |
| Constructor and Description |
|---|
FileSinkFunction(OutputFormat<IN> format) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
flush() |
void |
invoke(IN record)
Function for standard sink behaviour.
|
void |
open(Configuration parameters) |
protected abstract void |
resetParameters()
Statements to be executed after writing a batch goes here.
|
void |
setInputType(TypeInformation<?> type,
ExecutionConfig executionConfig) |
protected abstract boolean |
updateCondition()
Condition for writing the contents of tupleList and clearing it.
|
getIterationRuntimeContext, getRuntimeContext, setRuntimeContextprotected volatile OutputFormat<IN> format
protected volatile boolean cleanupCalled
protected int indexInSubtaskGroup
protected int currentNumberOfSubtasks
public FileSinkFunction(OutputFormat<IN> format)
public void open(Configuration parameters) throws Exception
open in interface RichFunctionopen in class AbstractRichFunctionExceptionpublic void setInputType(TypeInformation<?> type, ExecutionConfig executionConfig)
setInputType in interface org.apache.flink.api.java.typeutils.InputTypeConfigurablepublic void invoke(IN record) throws Exception
SinkFunctioninvoke in interface SinkFunction<IN>invoke in class RichSinkFunction<IN>record - The input record.Exceptionpublic void close()
throws IOException
close in interface RichFunctionclose in class AbstractRichFunctionIOExceptionprotected void flush()
protected abstract boolean updateCondition()
protected abstract void resetParameters()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.