public abstract class TimeBasedJob extends AbstractJob
This class has the same configuration and methods as AbstractJob
.
In addition it also recognizes the following properties:
Methods are available as well for setting these configuration parameters.
Constructor and Description |
---|
TimeBasedJob()
Initializes the job.
|
TimeBasedJob(java.lang.String name,
java.util.Properties props)
Initializes the job with a job name and properties.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getDaysAgo()
Gets the number of days to subtract off the end of the consumption window.
|
java.util.Date |
getEndDate()
Gets the end date.
|
java.lang.Integer |
getNumDays()
Gets the number of consecutive days to process.
|
java.util.Date |
getStartDate()
Gets the start date.
|
void |
setDaysAgo(java.lang.Integer daysAgo)
Sets the number of days to subtract off the end of the consumption window.
|
void |
setEndDate(java.util.Date endDate)
Sets the end date.
|
void |
setNumDays(java.lang.Integer numDays)
Sets the number of consecutive days to process.
|
void |
setProperties(java.util.Properties props)
Sets the configuration properties.
|
void |
setStartDate(java.util.Date startDate)
Sets the start date.
|
protected void |
validate()
Validation required before running job.
|
config, createRandomTempPath, ensurePath, getCountersParentPath, getFileSystem, getInputPaths, getName, getNumReducers, getOutputPath, getProperties, getRetentionCount, getTempPath, initialize, isUseCombiner, randomTempPath, run, setCountersParentPath, setInputPaths, setName, setNumReducers, setOutputPath, setRetentionCount, setTempPath, setUseCombiner
public TimeBasedJob()
public TimeBasedJob(java.lang.String name, java.util.Properties props)
name
- Job nameprops
- Configuration propertiespublic void setProperties(java.util.Properties props)
AbstractJob
setProperties
in class AbstractJob
props
- Propertiespublic java.lang.Integer getNumDays()
public void setNumDays(java.lang.Integer numDays)
numDays
- number of days to processpublic java.lang.Integer getDaysAgo()
public void setDaysAgo(java.lang.Integer daysAgo)
daysAgo
- Days agopublic java.util.Date getStartDate()
public void setStartDate(java.util.Date startDate)
startDate
- start datepublic java.util.Date getEndDate()
public void setEndDate(java.util.Date endDate)
endDate
- end dateprotected void validate()
AbstractJob
validate
in class AbstractJob