|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.OutputFormat<K,V> org.apache.hadoop.mapreduce.lib.output.FilterOutputFormat<K,V> org.apache.hadoop.mapreduce.lib.output.LazyOutputFormat<K,V>
@InterfaceAudience.Public @InterfaceStability.Stable public class LazyOutputFormat<K,V>
A Convenience class that creates output lazily.
Use in conjuction with org.apache.hadoop.mapreduce.lib.output.MultipleOutputs to recreate the
behaviour of org.apache.hadoop.mapred.lib.MultipleTextOutputFormat (etc) of the old Hadoop API.
See MultipleOutputs
documentation for more information.
Field Summary | |
---|---|
static String |
OUTPUT_FORMAT
|
Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FilterOutputFormat |
---|
baseOut |
Constructor Summary | |
---|---|
LazyOutputFormat()
|
Method Summary | |
---|---|
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,
Class<? extends OutputFormat> theClass)
Set the underlying output format for LazyOutputFormat. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String OUTPUT_FORMAT
Constructor Detail |
---|
public LazyOutputFormat()
Method Detail |
---|
public static void setOutputFormatClass(Job job, Class<? extends OutputFormat> theClass)
job
- the Job
to modifytheClass
- the underlying classpublic RecordWriter<K,V> getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException
OutputFormat
RecordWriter
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.
IOException
InterruptedException
public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException
OutputFormat
This 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 job
IOException
- when output should not be attempted
InterruptedException
public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException
OutputFormat
getOutputCommitter
in class FilterOutputFormat<K,V>
context
- the task context
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |