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:
FileInputFormat,GenericInputFormat,ReplicatingInputFormat
@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 voidcloseInputFormat()Closes this InputFormat instance.RuntimeContextgetRuntimeContext()voidopenInputFormat()Opens this InputFormat instance.voidsetRuntimeContext(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 IOExceptionOpens 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 IOExceptionCloses 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
-
-