IN - Input tuple type@PublicEvolving public abstract class WriteSinkFunction<IN> extends Object implements SinkFunction<IN>
| Modifier and Type | Field and Description |
|---|---|
protected WriteFormat<IN> |
format |
protected String |
path |
protected ArrayList<IN> |
tupleList |
| Constructor and Description |
|---|
WriteSinkFunction(String path,
WriteFormat<IN> format) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanFile(String path)
Creates target file if it does not exist, cleans it if it exists.
|
void |
invoke(IN tuple)
Implementation of the invoke method of the SinkFunction class.
|
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 final String path
protected WriteFormat<IN> format
public WriteSinkFunction(String path, WriteFormat<IN> format)
protected void cleanFile(String path)
path - is the path to the location where the tuples are writtenprotected abstract boolean updateCondition()
protected abstract void resetParameters()
public void invoke(IN tuple)
invoke in interface SinkFunction<IN>tuple - The input record.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.