K - Type of KeyV - Type of ValueT - Record type.@Internal public abstract class HadoopOutputFormatBase<K,V,T> extends HadoopOutputFormatCommonBase<T> implements FinalizeOnMaster
| Modifier and Type | Field and Description |
|---|---|
protected static Object |
CLOSE_MUTEX |
protected static Object |
CONFIGURE_MUTEX |
protected org.apache.hadoop.mapred.TaskAttemptContext |
context |
protected org.apache.hadoop.mapred.JobConf |
jobConf |
protected org.apache.hadoop.mapred.OutputFormat<K,V> |
mapredOutputFormat |
protected static Object |
OPEN_MUTEX |
protected org.apache.hadoop.mapred.OutputCommitter |
outputCommitter |
protected org.apache.hadoop.mapred.RecordWriter<K,V> |
recordWriter |
credentials| Constructor and Description |
|---|
HadoopOutputFormatBase(org.apache.hadoop.mapred.OutputFormat<K,V> mapredOutputFormat,
org.apache.hadoop.mapred.JobConf job) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
commit the task by moving the output file out from the temporary directory.
|
void |
configure(Configuration parameters) |
void |
finalizeGlobal(int parallelism) |
org.apache.hadoop.mapred.JobConf |
getJobConf() |
void |
open(int taskNumber,
int numTasks)
create the temporary output file for hadoop RecordWriter.
|
read, writegetRuntimeContext, setRuntimeContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteRecordprotected static final Object OPEN_MUTEX
protected static final Object CONFIGURE_MUTEX
protected static final Object CLOSE_MUTEX
protected org.apache.hadoop.mapred.JobConf jobConf
protected transient org.apache.hadoop.mapred.OutputCommitter outputCommitter
protected transient org.apache.hadoop.mapred.TaskAttemptContext context
public org.apache.hadoop.mapred.JobConf getJobConf()
public void configure(Configuration parameters)
configure in interface OutputFormat<T>public void open(int taskNumber,
int numTasks)
throws IOException
open in interface OutputFormat<T>taskNumber - The number of the parallel instance.numTasks - The number of parallel tasks.IOExceptionpublic void close()
throws IOException
close in interface OutputFormat<T>IOExceptionpublic void finalizeGlobal(int parallelism)
throws IOException
finalizeGlobal in interface FinalizeOnMasterIOExceptionCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.