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.mapreduce.HadoopOutputFormatBase<K,V,T>
-
- 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
Base class shared between the Java and Scala API of Flink.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static ObjectCLOSE_MUTEXprotected org.apache.hadoop.conf.Configurationconfigurationprotected static ObjectCONFIGURE_MUTEXprotected org.apache.hadoop.mapreduce.TaskAttemptContextcontextprotected org.apache.hadoop.mapreduce.OutputFormat<K,V>mapreduceOutputFormatprotected static ObjectOPEN_MUTEXprotected org.apache.hadoop.mapreduce.OutputCommitteroutputCommitterprotected org.apache.hadoop.mapreduce.RecordWriter<K,V>recordWriterprotected inttaskNumber-
Fields inherited from class org.apache.flink.api.java.hadoop.common.HadoopOutputFormatCommonBase
credentials
-
-
Constructor Summary
Constructors Constructor Description HadoopOutputFormatBase(org.apache.hadoop.mapreduce.OutputFormat<K,V> mapreduceOutputFormat, org.apache.hadoop.mapreduce.Job 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.conf.ConfigurationgetConfiguration()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
-
configuration
protected org.apache.hadoop.conf.Configuration configuration
-
mapreduceOutputFormat
protected org.apache.hadoop.mapreduce.OutputFormat<K,V> mapreduceOutputFormat
-
outputCommitter
protected transient org.apache.hadoop.mapreduce.OutputCommitter outputCommitter
-
context
protected transient org.apache.hadoop.mapreduce.TaskAttemptContext context
-
taskNumber
protected transient int taskNumber
-
-
Method Detail
-
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
-
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>- 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
-
-