IN - Input typepublic abstract class FileSinkFunction<IN> extends RichSinkFunction<IN>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cleanupCalled |
protected int |
currentNumberOfSubtasks |
protected org.apache.flink.api.common.io.OutputFormat<IN> |
format |
protected int |
indexInSubtaskGroup |
protected ArrayList<IN> |
tupleList |
| Constructor and Description |
|---|
FileSinkFunction(org.apache.flink.api.common.io.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(org.apache.flink.configuration.Configuration parameters) |
protected abstract void |
resetParameters()
Statements to be executed after writing a batch goes here.
|
protected abstract boolean |
updateCondition()
Condition for writing the contents of tupleList and clearing it.
|
protected volatile org.apache.flink.api.common.io.OutputFormat<IN> format
protected volatile boolean cleanupCalled
protected int indexInSubtaskGroup
protected int currentNumberOfSubtasks
public FileSinkFunction(org.apache.flink.api.common.io.OutputFormat<IN> format)
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 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 org.apache.flink.api.common.functions.RichFunctionclose in class org.apache.flink.api.common.functions.AbstractRichFunctionIOExceptionprotected void flush()
protected abstract boolean updateCondition()
protected abstract void resetParameters()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.