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

java.lang.Object
  extended by org.terrier.utility.io.HadoopUtility.MapBase<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.Mapper<K1,V1,K2,V2>
Enclosing class:
HadoopUtility

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

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

Author:
richardm

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

Field Detail

jc

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

HadoopUtility.MapBase

public HadoopUtility.MapBase()
Method Detail

configureReduce

protected void configureReduce()
                        throws IOException
Throws:
IOException

closeReduce

protected void closeReduce()
                    throws IOException
Throws:
IOException

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 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

closeMap

protected abstract void closeMap()
                          throws IOException
Throws:
IOException


Terrier 3.6. Copyright © 2004-2011 University of Glasgow