K
- the type of the input keysV
- the type of the input values
public abstract class BaseJob<K,V>
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Modifier and Type | Field and Description |
---|---|
protected CmdArgsParser |
argsp |
protected java.lang.Class<?> |
jarClass |
Constructor and Description |
---|
BaseJob() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.hadoop.mapreduce.Job job) |
void |
configure(org.apache.hadoop.mapred.JobConf conf)
Validates and adds the current parameters to the job configuration
|
protected org.apache.hadoop.mapreduce.Job |
createJob() |
protected org.apache.hadoop.mapreduce.Job |
createJob(org.apache.hadoop.conf.Configuration conf) |
protected org.apache.hadoop.mapreduce.Job |
createJob(org.apache.hadoop.conf.Configuration conf, java.lang.String jobName) |
protected org.apache.hadoop.mapreduce.Job |
createJob(org.apache.hadoop.conf.Configuration conf, java.lang.String jobName, java.lang.String jar) |
protected org.apache.hadoop.mapred.JobConf |
createJobConf()
Creates a job configuration
|
protected org.apache.hadoop.mapred.JobConf |
createJobConf(org.apache.hadoop.mapred.JobConf baseConf) |
protected org.apache.hadoop.mapred.JobConf |
createJobConf(org.apache.hadoop.mapred.JobConf baseConf, java.lang.String jobName) |
java.lang.String |
getCmdOptions()
Gets a description of the arguments expected from command line.
|
java.lang.String |
getInput()
Gets the job input
|
java.lang.Class<?> |
getInputFormatClass()
Gets the input format used to read the input data
|
java.lang.Class<?> |
getJarClass() |
java.lang.String |
getOutput()
Gets the job output path
|
java.lang.Class<? extends RecordInfoProvider<K,V>> |
getRecordInfoProviderClass()
Gets the
RecordInfoProvider class used to interpret input records. |
SpatialConfig |
getSpatialConfig()
Gets the spatial configuration that describes the geometries in the input data.
|
void |
processArgs(java.lang.String[] args, org.apache.hadoop.conf.Configuration conf)
Extracts and validates arguments from the command line
|
void |
setInput(java.lang.String input)
Sets the job input
|
void |
setInputFormatClass(java.lang.Class<?> inputFormatClass)
Sets the input format used to read the input data
|
void |
setJarClass(java.lang.Class<?> jarClass) |
void |
setOutput(java.lang.String output)
Sets the job output
|
void |
setRecordInfoProviderClass(java.lang.Class<? extends RecordInfoProvider<K,V>> recordInfoProviderClass)
Sets the
RecordInfoProvider class used to interpret input records. |
void |
setSpatialConfig(SpatialConfig spatialConfig)
Sets the spatial configuration that describes the geometries in the input data.
|
protected CmdArgsParser argsp
protected java.lang.Class<?> jarClass
public java.lang.String getInput()
public void setInput(java.lang.String input)
input
- a path, comma-separated paths or a path patternpublic java.lang.String getOutput()
public void setOutput(java.lang.String output)
output
- a pathpublic java.lang.Class<?> getInputFormatClass()
public void setInputFormatClass(java.lang.Class<?> inputFormatClass)
inputFormatClass
- an InputFormat subclasspublic java.lang.Class<? extends RecordInfoProvider<K,V>> getRecordInfoProviderClass()
RecordInfoProvider
class used to interpret input records.RecordInfoProvider
subclasspublic void setRecordInfoProviderClass(java.lang.Class<? extends RecordInfoProvider<K,V>> recordInfoProviderClass)
RecordInfoProvider
class used to interpret input records.recordInfoProviderClass
- a RecordInfoProvider
subclasspublic void setSpatialConfig(SpatialConfig spatialConfig)
spatialConfig
- the spatial configurationpublic SpatialConfig getSpatialConfig()
public void setJarClass(java.lang.Class<?> jarClass)
public java.lang.Class<?> getJarClass()
public void processArgs(java.lang.String[] args, org.apache.hadoop.conf.Configuration conf) throws java.lang.Exception
args
- arguments from the command lineconf
- the job configurationjava.lang.Exception
public java.lang.String getCmdOptions()
public void configure(org.apache.hadoop.mapred.JobConf conf) throws java.lang.Exception
conf
- the job configurationjava.lang.Exception
public void configure(org.apache.hadoop.mapreduce.Job job) throws java.lang.Exception
java.lang.Exception
protected org.apache.hadoop.mapred.JobConf createJobConf()
protected org.apache.hadoop.mapred.JobConf createJobConf(org.apache.hadoop.mapred.JobConf baseConf)
protected org.apache.hadoop.mapred.JobConf createJobConf(org.apache.hadoop.mapred.JobConf baseConf, java.lang.String jobName)
protected org.apache.hadoop.mapreduce.Job createJob() throws java.io.IOException
java.io.IOException
protected org.apache.hadoop.mapreduce.Job createJob(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOException
protected org.apache.hadoop.mapreduce.Job createJob(org.apache.hadoop.conf.Configuration conf, java.lang.String jobName) throws java.io.IOException
java.io.IOException
protected org.apache.hadoop.mapreduce.Job createJob(org.apache.hadoop.conf.Configuration conf, java.lang.String jobName, java.lang.String jar) throws java.io.IOException
java.io.IOException