public class LazyOutputFormat<K,V> extends FilterOutputFormat<K,V>
FilterOutputFormat.FilterRecordWriter<K,V>| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OUTPUT_FORMAT |
baseOut| Constructor and Description |
|---|
LazyOutputFormat() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkOutputSpecs(JobContext context)
Check for validity of the output-specification for the job.
|
OutputCommitter |
getOutputCommitter(TaskAttemptContext context)
Get the output committer for this output format.
|
RecordWriter<K,V> |
getRecordWriter(TaskAttemptContext context)
Get the
RecordWriter for the given task. |
static void |
setOutputFormatClass(Job job,
java.lang.Class<? extends OutputFormat> theClass)
Set the underlying output format for LazyOutputFormat.
|
public static void setOutputFormatClass(Job job, java.lang.Class<? extends OutputFormat> theClass)
job - the Job to modifytheClass - the underlying classpublic RecordWriter<K,V> getRecordWriter(TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
OutputFormatRecordWriter for the given task.getRecordWriter in class FilterOutputFormat<K,V>context - the information about the current task.RecordWriter to write the output for the job.java.io.IOExceptionjava.lang.InterruptedExceptionpublic void checkOutputSpecs(JobContext context) throws java.io.IOException, java.lang.InterruptedException
OutputFormatThis is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten.
checkOutputSpecs in class FilterOutputFormat<K,V>context - information about the jobjava.io.IOException - when output should not be attemptedjava.lang.InterruptedExceptionpublic OutputCommitter getOutputCommitter(TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
OutputFormatgetOutputCommitter in class FilterOutputFormat<K,V>context - the task contextjava.io.IOExceptionjava.lang.InterruptedExceptionCopyright © 2009 The Apache Software Foundation