org.apache.hadoop.streaming
Class PipeReducer

java.lang.Object
  extended by org.apache.hadoop.streaming.PipeMapRed
      extended by org.apache.hadoop.streaming.PipeReducer
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer
Direct Known Subclasses:
PipeCombiner

public class PipeReducer
extends PipeMapRed
implements org.apache.hadoop.mapred.Reducer

A generic Reducer bridge. It delegates operations to an external program via stdin and stdout.


Field Summary
 
Fields inherited from class org.apache.hadoop.streaming.PipeMapRed
LOG, outerrThreadsThrowable
 
Constructor Summary
PipeReducer()
           
 
Method Summary
 void close()
           
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 byte[] getFieldSeparator()
          Returns the field separator to be used.
 byte[] getInputSeparator()
          Returns the input separator to be used.
 int getNumOfKeyFields()
          Returns the number of key fields.
 void reduce(Object key, Iterator values, org.apache.hadoop.mapred.OutputCollector output, org.apache.hadoop.mapred.Reporter reporter)
           
 
Methods inherited from class org.apache.hadoop.streaming.PipeMapRed
getClientInput, getClientOutput, getConfiguration, getContext, mapRedFinished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipeReducer

public PipeReducer()
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 PipeMapRed

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

getInputSeparator

public byte[] getInputSeparator()
Description copied from class: PipeMapRed
Returns the input separator to be used.

Specified by:
getInputSeparator in class PipeMapRed

getFieldSeparator

public byte[] getFieldSeparator()
Description copied from class: PipeMapRed
Returns the field separator to be used.

Specified by:
getFieldSeparator in class PipeMapRed

getNumOfKeyFields

public int getNumOfKeyFields()
Description copied from class: PipeMapRed
Returns the number of key fields.

Specified by:
getNumOfKeyFields in class PipeMapRed


Copyright © 2014 Apache Software Foundation. All Rights Reserved.