edu.yale.cs.hadoopdb.exec
Class DBJobBase

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by edu.yale.cs.hadoopdb.exec.DBJobBase
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
Direct Known Subclasses:
AggTaskLargeDB, AggTaskSmallDB, GrepTaskDB, JoinTaskDB, SelectionTaskDB, UDFAggTaskDB

public abstract class DBJobBase
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

DBJobBase is an abstract class for MapReduce jobs that read from a single HadoopDB relation partitioned across multiple databases. It reads in a partition configuration file and retrieves all information about the distribution of the relation and sets up appropriate connections depending on the replication factor setup. Extensions need to configure jobs by implementing configure and implementing necessary Map/Reduce functions.


Nested Class Summary
protected static class DBJobBase.DBJobBaseInputFormat
           
 
Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
DBJobBase()
           
 
Method Summary
protected abstract  org.apache.hadoop.mapred.JobConf configureJob(java.lang.String... args)
          Override this method to set job-specific options
protected  org.apache.hadoop.mapred.JobConf initConf(java.lang.String[] args)
          Job config initialization (command-line params etc).
 int printDbUsage()
           
protected abstract  int printUsage()
          Provide job-specific command-line help
 int run(java.lang.String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
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.conf.Configurable
getConf, setConf
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

DBJobBase

public DBJobBase()
Method Detail

configureJob

protected abstract org.apache.hadoop.mapred.JobConf configureJob(java.lang.String... args)
                                                          throws java.lang.Exception
Override this method to set job-specific options

Throws:
java.lang.Exception

initConf

protected org.apache.hadoop.mapred.JobConf initConf(java.lang.String[] args)
                                             throws java.lang.Exception
Job config initialization (command-line params etc).

Throws:
java.lang.Exception

printDbUsage

public int printDbUsage()

printUsage

protected abstract int printUsage()
Provide job-specific command-line help


run

public int run(java.lang.String[] args)
        throws java.lang.Exception
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
java.lang.Exception