org.terrier.utility.io
Class HadoopUtility.MapReduceBase<K1,V1,K2,V2,K3,V3>

java.lang.Object
  extended by org.terrier.utility.io.HadoopUtility.MapReduceBase<K1,V1,K2,V2,K3,V3>
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<K1,V1,K2,V2>, org.apache.hadoop.mapred.Reducer<K2,V2,K3,V3>
Direct Known Subclasses:
Inv2DirectMultiReduce
Enclosing class:
HadoopUtility

public abstract static class HadoopUtility.MapReduceBase<K1,V1,K2,V2,K3,V3>
extends java.lang.Object
implements org.apache.hadoop.mapred.Mapper<K1,V1,K2,V2>, org.apache.hadoop.mapred.Reducer<K2,V2,K3,V3>

Handy base class for MapReduce jobs.


Field Summary
protected  org.apache.hadoop.mapred.JobConf jc
           
 
Constructor Summary
HadoopUtility.MapReduceBase()
           
 
Method Summary
 void close()
          Called at end of map or reduce task.
protected abstract  void closeMap()
           
protected abstract  void closeReduce()
           
 void configure(org.apache.hadoop.mapred.JobConf _jc)
          
protected abstract  void configureMap()
           
protected abstract  void configureReduce()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.Mapper
map
 
Methods inherited from interface org.apache.hadoop.mapred.Reducer
reduce
 

Field Detail

jc

protected org.apache.hadoop.mapred.JobConf jc
Constructor Detail

HadoopUtility.MapReduceBase

public HadoopUtility.MapReduceBase()
Method Detail

configure

public void configure(org.apache.hadoop.mapred.JobConf _jc)

Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable

configureMap

protected abstract void configureMap()
                              throws java.io.IOException
Throws:
java.io.IOException

configureReduce

protected abstract void configureReduce()
                                 throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Called at end of map or reduce task. Calls internally closeMap() or closeReduce()

Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

closeMap

protected abstract void closeMap()
                          throws java.io.IOException
Throws:
java.io.IOException

closeReduce

protected abstract void closeReduce()
                             throws java.io.IOException
Throws:
java.io.IOException


Terrier 3.5. Copyright © 2004-2011 University of Glasgow