|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.mapreduce.JobFactoryBean
public class JobFactoryBean
Factory bean for creating a Hadoop Map-Reduce job.
Note that the setters for the class access class names (String) instead of direct
classes. This is done on purpose in case the job itself and its dependencies are
on a jar not available on the classpath (setJar(Resource)
) in which case
a special, on-the-fly classloader is used.
Constructor Summary | |
---|---|
JobFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
org.apache.hadoop.mapreduce.Job |
getObject()
|
java.lang.Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
protected void |
processJob(org.apache.hadoop.mapreduce.Job job)
|
void |
setArchives(org.springframework.core.io.Resource... archives)
Sets the archives to be unarchive to the map reduce cluster. |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader)
|
void |
setBeanName(java.lang.String name)
|
void |
setCodec(java.lang.String codecClass)
Sets the job codec class. |
void |
setCombiner(java.lang.String combiner)
Sets the job combiner class. |
void |
setCompressOutput(java.lang.Boolean compressOutput)
Indicates whether the job output should be compressed or not. |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the Hadoop configuration to use. |
void |
setFiles(org.springframework.core.io.Resource... files)
Sets the files to be copied to the map reduce cluster. |
void |
setGroupingComparator(java.lang.String groupingComparator)
Sets the job grouping comparator class. |
void |
setInputFormat(java.lang.String inputFormat)
Sets the job input format class. |
void |
setInputPath(java.lang.String... inputPath)
Sets the job input path. |
void |
setJar(org.springframework.core.io.Resource jar)
Sets the job jar (which might not be on the classpath). |
void |
setJarByClass(java.lang.Class<?> jarClass)
Determines the job jar (available on the classpath) based on the given class. |
void |
setKey(java.lang.String key)
Sets the job key class. |
void |
setLibs(org.springframework.core.io.Resource... libJars)
Sets the jar files to include in the classpath. |
void |
setMapKey(java.lang.String mapKey)
Sets the job map key class. |
void |
setMapper(java.lang.String mapper)
Sets the job mapper class. |
void |
setMapValue(java.lang.String mapValue)
Sets the job map value class. |
void |
setName(java.lang.String name)
Sets the job name. |
void |
setNumberReducers(java.lang.Integer numReduceTasks)
Sets the number of reduce task for this job. |
void |
setOutputFormat(java.lang.String outputFormat)
Sets the job output format class. |
void |
setOutputPath(java.lang.String outputPath)
Sets the job output path. |
void |
setPartitioner(java.lang.String partitioner)
Sets the job partitioner class. |
void |
setProperties(java.util.Properties properties)
The configuration properties to set for this job. |
void |
setReducer(java.lang.String reducer)
Sets the job reducer class. |
void |
setSortComparator(java.lang.String sortComparator)
Sets the job sort comparator class. |
void |
setUser(java.lang.String user)
Sets the user impersonation (optional) for running this job. |
void |
setValue(java.lang.String value)
Sets the job value class. |
void |
setWorkingDir(java.lang.String workingDir)
Sets the job working directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobFactoryBean()
Method Detail |
---|
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
public void setBeanName(java.lang.String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public org.apache.hadoop.mapreduce.Job getObject() throws java.lang.Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.mapreduce.Job>
java.lang.Exception
public java.lang.Class<?> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.mapreduce.Job>
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.mapreduce.Job>
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
protected void processJob(org.apache.hadoop.mapreduce.Job job) throws java.lang.Exception
java.lang.Exception
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- The configuration to set.public void setName(java.lang.String name)
name
- The name to set.public void setKey(java.lang.String key)
key
- The keyClass to set.public void setValue(java.lang.String value)
value
- The valueClass to set.public void setMapKey(java.lang.String mapKey)
mapKey
- The mapKeyClass to set.public void setMapValue(java.lang.String mapValue)
mapValue
- The mapValueClass to set.public void setMapper(java.lang.String mapper)
mapper
- The mapper to set.public void setReducer(java.lang.String reducer)
reducer
- The reducer to set.public void setCombiner(java.lang.String combiner)
combiner
- The combiner to set.public void setInputFormat(java.lang.String inputFormat)
inputFormat
- The inputFormat to set.public void setOutputFormat(java.lang.String outputFormat)
outputFormat
- The outputFormat to set.public void setPartitioner(java.lang.String partitioner)
partitioner
- The partitioner to set.public void setSortComparator(java.lang.String sortComparator)
sortComparator
- The sortComparator to set.public void setGroupingComparator(java.lang.String groupingComparator)
groupingComparator
- The groupingComparator to set.public void setWorkingDir(java.lang.String workingDir)
workingDir
- The workingDir to set.public void setNumberReducers(java.lang.Integer numReduceTasks)
numReduceTasks
- The numReduceTasks to set.public void setJarByClass(java.lang.Class<?> jarClass)
jarClass
- The jarClass to set.public void setJar(org.springframework.core.io.Resource jar)
jar
- The jar to set.public void setInputPath(java.lang.String... inputPath)
inputPath
- job input path.public void setOutputPath(java.lang.String outputPath)
outputPath
- The outputPath to set.public void setCompressOutput(java.lang.Boolean compressOutput)
compressOutput
- The compressOutput to set.public void setCodec(java.lang.String codecClass)
codecClass
- The codecClass to set.public void setProperties(java.util.Properties properties)
properties
- The properties to set.public void setLibs(org.springframework.core.io.Resource... libJars)
mydir/*.jar
), which the
Spring container will automatically resolve.
libJars
- The jar files to include in the classpath.public void setFiles(org.springframework.core.io.Resource... files)
mydir/*.txt
), which the
Spring container will automatically resolve.
files
- The files to copy.public void setArchives(org.springframework.core.io.Resource... archives)
mydir/*.zip
), which the
Spring container will automatically resolve.
archives
- The archives to unarchive on the compute machines.public void setUser(java.lang.String user)
user
- user/group information
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |