public class JobFactoryBean extends Object implements InitializingBean, FactoryBean<Job>, BeanNameAware, BeanClassLoaderAware
setJar(Resource)) in which case
a special, on-the-fly classloader is used.| Constructor and Description |
|---|
JobFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Job |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
protected void |
processJob(Job job) |
void |
setArchives(Resource... archives)
Sets the archives to be unarchive to the map reduce cluster.
|
void |
setBeanClassLoader(ClassLoader classLoader) |
void |
setBeanName(String name) |
void |
setCodec(String codecClass)
Sets the job codec class.
|
void |
setCombiner(String combiner)
Sets the job combiner class.
|
void |
setCompressOutput(Boolean compressOutput)
Indicates whether the job output should be compressed or not.
|
void |
setConfiguration(Configuration configuration)
Sets the Hadoop configuration to use.
|
void |
setFiles(Resource... files)
Sets the files to be copied to the map reduce cluster.
|
void |
setGroupingComparator(String groupingComparator)
Sets the job grouping comparator class.
|
void |
setInputFormat(String inputFormat)
Sets the job input format class.
|
void |
setInputPath(String... inputPath)
Sets the job input path.
|
void |
setJar(Resource jar)
Sets the job jar (which might not be on the classpath).
|
void |
setJarByClass(Class<?> jarClass)
Determines the job jar (available on the classpath) based on the given class.
|
void |
setKey(String key)
Sets the job key class.
|
void |
setLibs(Resource... libJars)
Sets the jar files to include in the classpath.
|
void |
setMapKey(String mapKey)
Sets the job map key class.
|
void |
setMapper(String mapper)
Sets the job mapper class.
|
void |
setMapValue(String mapValue)
Sets the job map value class.
|
void |
setName(String name)
Sets the job name.
|
void |
setNumberReducers(Integer numReduceTasks)
Sets the number of reduce task for this job.
|
void |
setOutputFormat(String outputFormat)
Sets the job output format class.
|
void |
setOutputPath(String outputPath)
Sets the job output path.
|
void |
setPartitioner(String partitioner)
Sets the job partitioner class.
|
void |
setProperties(Properties properties)
The configuration properties to set for this job.
|
void |
setReducer(String reducer)
Sets the job reducer class.
|
void |
setSortComparator(String sortComparator)
Sets the job sort comparator class.
|
void |
setUser(String user)
Sets the user impersonation (optional) for running this job.
|
void |
setValue(String value)
Sets the job value class.
|
void |
setWorkingDir(String workingDir)
Sets the job working directory.
|
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setBeanName(String name)
setBeanName in interface BeanNameAwarepublic Job getObject() throws Exception
getObject in interface FactoryBean<Job>Exceptionpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<Job>public boolean isSingleton()
isSingleton in interface FactoryBean<Job>public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void setConfiguration(Configuration configuration)
configuration - The configuration to set.public void setName(String name)
name - The name to set.public void setKey(String key)
key - The keyClass to set.public void setValue(String value)
value - The valueClass to set.public void setMapKey(String mapKey)
mapKey - The mapKeyClass to set.public void setMapValue(String mapValue)
mapValue - The mapValueClass to set.public void setMapper(String mapper)
mapper - The mapper to set.public void setReducer(String reducer)
reducer - The reducer to set.public void setCombiner(String combiner)
combiner - The combiner to set.public void setInputFormat(String inputFormat)
inputFormat - The inputFormat to set.public void setOutputFormat(String outputFormat)
outputFormat - The outputFormat to set.public void setPartitioner(String partitioner)
partitioner - The partitioner to set.public void setSortComparator(String sortComparator)
sortComparator - The sortComparator to set.public void setGroupingComparator(String groupingComparator)
groupingComparator - The groupingComparator to set.public void setWorkingDir(String workingDir)
workingDir - The workingDir to set.public void setNumberReducers(Integer numReduceTasks)
numReduceTasks - The numReduceTasks to set.public void setJarByClass(Class<?> jarClass)
jarClass - The jarClass to set.public void setJar(Resource jar)
jar - The jar to set.public void setInputPath(String... inputPath)
inputPath - job input path.public void setOutputPath(String outputPath)
outputPath - The outputPath to set.public void setCompressOutput(Boolean compressOutput)
compressOutput - The compressOutput to set.public void setCodec(String codecClass)
codecClass - The codecClass to set.public void setProperties(Properties properties)
properties - The properties to set.public void setLibs(Resource... libJars)
mydir/*.jar), which the
Spring container will automatically resolve.libJars - The jar files to include in the classpath.public void setFiles(Resource... files)
mydir/*.txt), which the
Spring container will automatically resolve.files - The files to copy.public void setArchives(Resource... archives)
mydir/*.zip), which the
Spring container will automatically resolve.archives - The archives to unarchive on the compute machines.public void setUser(String user)
user - user/group information