org.apache.hadoop.hive.ql.exec.mr
Class ExecReducer

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.hadoop.hive.ql.exec.mr.ExecReducer
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer

public class ExecReducer
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer

ExecReducer is the generic Reducer class for Hive. Together with ExecMapper it is the bridge between the map-reduce framework and the Hive operator pipeline at execution time. It's main responsabilities are: - Load and setup the operator pipeline from XML - Run the pipeline by transforming key, value pairs to records and forwarding them to the operators - Sending start and end group messages to separate records with same key from one another - Catch and handle errors during execution of the operators.


Field Summary
static org.apache.commons.logging.Log l4j
           
 
Constructor Summary
ExecReducer()
           
 
Method Summary
 void close()
           
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 void reduce(Object key, Iterator values, org.apache.hadoop.mapred.OutputCollector output, org.apache.hadoop.mapred.Reporter reporter)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

l4j

public static final org.apache.commons.logging.Log l4j
Constructor Detail

ExecReducer

public ExecReducer()
Method Detail

configure

public void configure(org.apache.hadoop.mapred.JobConf job)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable
Overrides:
configure in class org.apache.hadoop.mapred.MapReduceBase

reduce

public void reduce(Object key,
                   Iterator values,
                   org.apache.hadoop.mapred.OutputCollector output,
                   org.apache.hadoop.mapred.Reporter reporter)
            throws IOException
Specified by:
reduce in interface org.apache.hadoop.mapred.Reducer
Throws:
IOException

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class org.apache.hadoop.mapred.MapReduceBase


Copyright © 2014 The Apache Software Foundation. All rights reserved.