Package org.apache.flink.api.common.io
Class RichInputFormat<OT,T extends InputSplit>
- java.lang.Object
-
- org.apache.flink.api.common.io.RichInputFormat<OT,T>
-
- All Implemented Interfaces:
Serializable
,InputFormat<OT,T>
,InputSplitSource<T>
- Direct Known Subclasses:
BroadcastStateInputFormat
,FileInputFormat
,GenericInputFormat
,HadoopInputFormatCommonBase
,KeyedStateInputFormat
,ListStateInputFormat
,ReplicatingInputFormat
,UnionStateInputFormat
@Public public abstract class RichInputFormat<OT,T extends InputSplit> extends Object implements InputFormat<OT,T>
An abstract stub implementation for Rich input formats. Rich formats have access to their runtime execution context viagetRuntimeContext()
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RichInputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeInputFormat()
Closes this InputFormat instance.RuntimeContext
getRuntimeContext()
void
openInputFormat()
Opens this InputFormat instance.void
setRuntimeContext(RuntimeContext t)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.io.InputFormat
close, configure, createInputSplits, getInputSplitAssigner, getStatistics, nextRecord, open, reachedEnd
-
-
-
-
Method Detail
-
setRuntimeContext
public void setRuntimeContext(RuntimeContext t)
-
getRuntimeContext
public RuntimeContext getRuntimeContext()
-
openInputFormat
@PublicEvolving public void openInputFormat() throws IOException
Opens this InputFormat instance. This method is called once per parallel instance. Resources should be allocated in this method. (e.g. database connections, cache, etc.)- Throws:
IOException
- in case allocating the resources failed.- See Also:
InputFormat
-
closeInputFormat
@PublicEvolving public void closeInputFormat() throws IOException
Closes this InputFormat instance. This method is called once per parallel instance. Resources allocated duringopenInputFormat()
should be closed in this method.- Throws:
IOException
- in case closing the resources failed- See Also:
InputFormat
-
-