public abstract class HadoopOutputFormatBase<K,V,T> extends Object implements OutputFormat<T>, FinalizeOnMaster
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.mapreduce.RecordWriter<K,V> |
recordWriter |
| Constructor and Description |
|---|
HadoopOutputFormatBase(org.apache.hadoop.mapreduce.OutputFormat<K,V> mapreduceOutputFormat,
org.apache.hadoop.mapreduce.Job 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.conf.Configuration |
getConfiguration() |
void |
open(int taskNumber,
int numTasks)
create the temporary output file for hadoop RecordWriter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteRecordpublic org.apache.hadoop.conf.Configuration getConfiguration()
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 © 2015 The Apache Software Foundation. All rights reserved.