org.apache.hadoop.streaming
Class PipeMapper

java.lang.Object
  extended by org.apache.hadoop.streaming.PipeMapRed
      extended by org.apache.hadoop.streaming.PipeMapper
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper

public class PipeMapper
extends PipeMapRed
implements org.apache.hadoop.mapred.Mapper

A generic Mapper 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
PipeMapper()
           
 
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 map(Object key, Object value, 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

PipeMapper

public PipeMapper()
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

map

public void map(Object key,
                Object value,
                org.apache.hadoop.mapred.OutputCollector output,
                org.apache.hadoop.mapred.Reporter reporter)
         throws IOException
Specified by:
map in interface org.apache.hadoop.mapred.Mapper
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.