Class HadoopOutputFormatBase<K,V,T>
- java.lang.Object
-
- org.apache.flink.api.common.io.RichOutputFormat<T>
-
- org.apache.flink.api.java.hadoop.common.HadoopOutputFormatCommonBase<T>
-
- org.apache.flink.api.java.hadoop.mapred.HadoopOutputFormatBase<K,V,T>
-
- Type Parameters:
K- Type of KeyV- Type of ValueT- Record type.
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.io.FinalizeOnMaster,org.apache.flink.api.common.io.OutputFormat<T>
- Direct Known Subclasses:
HadoopOutputFormat
@Internal public abstract class HadoopOutputFormatBase<K,V,T> extends HadoopOutputFormatCommonBase<T> implements org.apache.flink.api.common.io.FinalizeOnMaster
Common base for the mapred HadoopOutputFormat wrappers. There are implementations for Java and Scala.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static ObjectCLOSE_MUTEXprotected static ObjectCONFIGURE_MUTEXprotected org.apache.hadoop.mapred.TaskAttemptContextcontextprotected org.apache.hadoop.mapred.JobConfjobConfprotected org.apache.hadoop.mapred.OutputFormat<K,V>mapredOutputFormatprotected static ObjectOPEN_MUTEXprotected org.apache.hadoop.mapred.OutputCommitteroutputCommitterprotected org.apache.hadoop.mapred.RecordWriter<K,V>recordWriter-
Fields inherited from class org.apache.flink.api.java.hadoop.common.HadoopOutputFormatCommonBase
credentials
-
-
Constructor Summary
Constructors Constructor Description HadoopOutputFormatBase(org.apache.hadoop.mapred.OutputFormat<K,V> mapredOutputFormat, org.apache.hadoop.mapred.JobConf job)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()commit the task by moving the output file out from the temporary directory.voidconfigure(org.apache.flink.configuration.Configuration parameters)voidfinalizeGlobal(org.apache.flink.api.common.io.FinalizeOnMaster.FinalizationContext context)org.apache.hadoop.mapred.JobConfgetJobConf()voidopen(org.apache.flink.api.common.io.OutputFormat.InitializationContext context)create the temporary output file for hadoop RecordWriter.-
Methods inherited from class org.apache.flink.api.java.hadoop.common.HadoopOutputFormatCommonBase
read, write
-
Methods inherited from class org.apache.flink.api.common.io.RichOutputFormat
getRuntimeContext, setRuntimeContext
-
-
-
-
Field Detail
-
OPEN_MUTEX
protected static final Object OPEN_MUTEX
-
CONFIGURE_MUTEX
protected static final Object CONFIGURE_MUTEX
-
CLOSE_MUTEX
protected static final Object CLOSE_MUTEX
-
jobConf
protected org.apache.hadoop.mapred.JobConf jobConf
-
outputCommitter
protected transient org.apache.hadoop.mapred.OutputCommitter outputCommitter
-
context
protected transient org.apache.hadoop.mapred.TaskAttemptContext context
-
-
Method Detail
-
getJobConf
public org.apache.hadoop.mapred.JobConf getJobConf()
-
configure
public void configure(org.apache.flink.configuration.Configuration parameters)
- Specified by:
configurein interfaceorg.apache.flink.api.common.io.OutputFormat<K>
-
open
public void open(org.apache.flink.api.common.io.OutputFormat.InitializationContext context) throws IOExceptioncreate the temporary output file for hadoop RecordWriter.- Specified by:
openin interfaceorg.apache.flink.api.common.io.OutputFormat<K>- Parameters:
context- The initialization context.- Throws:
IOException
-
close
public void close() throws IOExceptioncommit the task by moving the output file out from the temporary directory.- Specified by:
closein interfaceorg.apache.flink.api.common.io.OutputFormat<K>- Throws:
IOException
-
finalizeGlobal
public void finalizeGlobal(org.apache.flink.api.common.io.FinalizeOnMaster.FinalizationContext context) throws IOException- Specified by:
finalizeGlobalin interfaceorg.apache.flink.api.common.io.FinalizeOnMaster- Throws:
IOException
-
-