@InterfaceAudience.Public @InterfaceStability.Stable public abstract class OutputFormat<K,V> extends Object
OutputFormatdescribes the output-specification for a Map-Reduce job.
The Map-Reduce framework relies on the
OutputFormat of the
RecordWriterimplementation to be used to write out the output files of the job. Output files are stored in a
|Constructor and Description|
|Modifier and Type||Method and Description|
Check for validity of the output-specification for the job.
Get the output committer for this output format.
public abstract RecordWriter<K,V> getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException
RecordWriterfor the given task.
context- the information about the current task.
RecordWriterto write the output for the job.
public abstract void checkOutputSpecs(JobContext context) throws IOException, InterruptedException
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.Implementations which write to filesystems which support delegation tokens usually collect the tokens for the destination path(s) and attach them to the job context's JobConf.
context- information about the job
IOException- when output should not be attempted
public abstract OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException
context- the task context
Copyright © 2023 Apache Software Foundation. All rights reserved.