org.terrier.utility.io
Class HadoopUtility.ReduceBase<K1,V1,K2,V2>

java.lang.Object
  extended by org.terrier.utility.io.HadoopUtility.ReduceBase<K1,V1,K2,V2>
Type Parameters:
K1 - key 1
V1 - value 1
K2 - key 2
V2 - value 2
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2>
Enclosing class:
HadoopUtility

public abstract static class HadoopUtility.ReduceBase<K1,V1,K2,V2>
extends Object
implements org.apache.hadoop.mapred.Reducer<K1,V1,K2,V2>

Abstract class that provides default configure and close methods for a Reducer.

Author:
richardm

Field Summary
protected  org.apache.hadoop.mapred.JobConf jc
           
 
Constructor Summary
HadoopUtility.ReduceBase()
           
 
Method Summary
 void close()
          Called at end of map or reduce task.
protected  void closeMap()
           
protected abstract  void closeReduce()
           
 void configure(org.apache.hadoop.mapred.JobConf _jc)
          
protected  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.Reducer
reduce
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface java.io.Closeable
close
 

Field Detail

jc

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

HadoopUtility.ReduceBase

public HadoopUtility.ReduceBase()
Method Detail

configureMap

protected void configureMap()
                     throws IOException
Throws:
IOException

closeMap

protected void closeMap()
                 throws IOException
Throws:
IOException

configure

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

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

configureReduce

protected abstract void configureReduce()
                                 throws IOException
Throws:
IOException

close

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

Specified by:
close in interface Closeable
Throws:
IOException

closeReduce

protected abstract void closeReduce()
                             throws IOException
Throws:
IOException


Terrier 3.6. Copyright © 2004-2011 University of Glasgow