@InterfaceAudience.Public
public class MROutput
extends org.apache.tez.runtime.api.AbstractLogicalOutput
MROutput is an Output which allows key/values pairs
 to be written by a processor.
 It is compatible with all standard Apache Hadoop MapReduce 
 OutputFormat implementations.
 
 This class is not meant to be extended by external projects.| Modifier and Type | Field and Description | 
|---|---|
protected org.apache.hadoop.mapreduce.OutputCommitter | 
committer  | 
| Constructor and Description | 
|---|
MROutput(org.apache.tez.runtime.api.OutputContext outputContext,
        int numPhysicalOutputs)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
abort()
MROutput expects that a Processor call abort in case of any error
 ( including an error during commit ) prior to the Processor's completion 
 | 
List<org.apache.tez.runtime.api.Event> | 
close()  | 
void | 
commit()
MROutput expects that a Processor call commit prior to the
 Processor's completion 
 | 
static org.apache.tez.mapreduce.output.MROutput.MROutputConfigBuilder | 
createConfigBuilder(org.apache.hadoop.conf.Configuration conf,
                   Class<?> outputFormat)
Create an  
MROutput.MROutputConfigBuilder | 
static org.apache.tez.mapreduce.output.MROutput.MROutputConfigBuilder | 
createConfigBuilder(org.apache.hadoop.conf.Configuration conf,
                   Class<?> outputFormat,
                   String outputPath)
Create an  
MROutput.MROutputConfigBuilder for a FileOutputFormat
 or FileOutputFormat based OutputFormats. | 
void | 
flush()
Call this in the processor before finishing to ensure outputs that 
 outputs have been flushed. 
 | 
org.apache.tez.runtime.library.api.KeyValueWriter | 
getWriter()
Get a key value write to write Map Reduce compatible output 
 | 
void | 
handleEvents(List<org.apache.tez.runtime.api.Event> outputEvents)  | 
void | 
initCommitter(org.apache.hadoop.mapred.JobConf job,
             boolean useNewApi)  | 
List<org.apache.tez.runtime.api.Event> | 
initialize()  | 
boolean | 
isCommitRequired()  | 
void | 
start()  | 
public MROutput(org.apache.tez.runtime.api.OutputContext outputContext,
        int numPhysicalOutputs)
public static org.apache.tez.mapreduce.output.MROutput.MROutputConfigBuilder createConfigBuilder(org.apache.hadoop.conf.Configuration conf,
                                                                                 @Nullable
                                                                                 Class<?> outputFormat)
MROutput.MROutputConfigBuilder 
 
 The preferred usage model is to provide all of the parameters, and use methods to configure
 the Output.
 
 For legacy applications, which may already have a fully configured Configuration
 instance, the outputFormat can be specified as nullconf - Configuration for the MROutput. This configuration instance will be
                     modified in placeoutputFormat - OutputFormat derived class. If the OutputFormat specified is
                     null, the provided configuration should be complete.MROutput.MROutputConfigBuilderpublic static org.apache.tez.mapreduce.output.MROutput.MROutputConfigBuilder createConfigBuilder(org.apache.hadoop.conf.Configuration conf,
                                                                                 @Nullable
                                                                                 Class<?> outputFormat,
                                                                                 @Nullable
                                                                                 String outputPath)
MROutput.MROutputConfigBuilder for a FileOutputFormat
 or FileOutputFormat based OutputFormats.
 
 The preferred usage model is to provide all of the parameters, and use methods to configure the
 Output.
 
 For legacy applications, which may already have a fully configured Configuration
 instance, the outputFormat and outputPath can be specified as nullconf - Configuration for the MROutput. This configuration instance will be
                     modified in placeoutputFormat - FileInputFormat derived class. If the InputFormat specified is
                     null, the provided configuration should be complete.outputPath - Output path. This can be null if already setup in the configurationMROutput.MROutputConfigBuilderpublic List<org.apache.tez.runtime.api.Event> initialize() throws IOException, InterruptedException
initialize in interface org.apache.tez.runtime.api.OutputFrameworkInterfaceinitialize in class org.apache.tez.runtime.api.AbstractLogicalOutputIOExceptionInterruptedExceptionpublic void start()
public void initCommitter(org.apache.hadoop.mapred.JobConf job,
                 boolean useNewApi)
                   throws IOException,
                          InterruptedException
IOExceptionInterruptedExceptionpublic boolean isCommitRequired()
                         throws IOException
IOExceptionpublic org.apache.tez.runtime.library.api.KeyValueWriter getWriter()
                                                            throws IOException
IOExceptionpublic void handleEvents(List<org.apache.tez.runtime.api.Event> outputEvents)
public List<org.apache.tez.runtime.api.Event> close() throws IOException
IOExceptionpublic void flush()
           throws IOException
IOExceptionpublic void commit()
            throws IOException
IOExceptionpublic void abort()
           throws IOException
IOExceptionCopyright © 2015 Apache Software Foundation. All rights reserved.