org.springframework.data.hadoop.mapreduce
Class StreamJobFactoryBean

java.lang.Object
  extended by org.springframework.data.hadoop.mapreduce.StreamJobFactoryBean
All Implemented Interfaces:
BeanNameAware, FactoryBean<Job>, InitializingBean

public class StreamJobFactoryBean
extends Object
implements InitializingBean, FactoryBean<Job>, BeanNameAware

Factory bean focused on creating streaming jobs. As opposed to JobFactoryBean which is Java-specific, this factory is suitable for streaming scenarios (such as invoking Ruby/Python scripts or command-line scripts).

Author:
Costin Leau

Constructor Summary
StreamJobFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 Job getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setArchive(String[] archives)
          Sets the job archives.
 void setBeanName(String name)
           
 void setCmdEnv(Properties cmdEnv)
          Sets the environment for the commands to be executed.
 void setCombiner(String combiner)
          Sets the job combiner.
 void setConfiguration(Configuration configuration)
          Sets the Hadoop configuration to use.
 void setFile(String[] files)
          Sets the job files.
 void setInputFormat(String inputFormat)
          Sets the job input format.
 void setInputPath(String[] input)
          Sets the job input paths.
 void setLibJar(String[] libJars)
          Sets the job jar libraries.
 void setMapper(String mapper)
          Sets the job mapper.
 void setNumReduceTasks(Integer numReduceTasks)
          Sets the job number of reducer tasks.
 void setOutputFormat(String outputFormat)
          Sets the job output format.
 void setOutputPath(String output)
          Sets the job output paths.
 void setPartitioner(String partitioner)
          Sets the job partitioner.
 void setProperties(Properties properties)
          Sets the configuration properties to use.
 void setReducer(String reducer)
          Sets the job reducer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamJobFactoryBean

public StreamJobFactoryBean()
Method Detail

setBeanName

public void setBeanName(String name)
Specified by:
setBeanName in interface BeanNameAware

getObject

public Job getObject()
              throws Exception
Specified by:
getObject in interface FactoryBean<Job>
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<Job>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<Job>

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

setInputPath

public void setInputPath(String[] input)
Sets the job input paths.

Parameters:
input - The input to set.

setOutputPath

public void setOutputPath(String output)
Sets the job output paths.

Parameters:
output - The output to set.

setMapper

public void setMapper(String mapper)
Sets the job mapper.

Parameters:
mapper - The mapper to set.

setReducer

public void setReducer(String reducer)
Sets the job reducer.

Parameters:
reducer - The reducer to set.

setCombiner

public void setCombiner(String combiner)
Sets the job combiner.

Parameters:
combiner - The combiner to set.

setInputFormat

public void setInputFormat(String inputFormat)
Sets the job input format.

Parameters:
inputFormat - The inputFormat to set.

setOutputFormat

public void setOutputFormat(String outputFormat)
Sets the job output format.

Parameters:
outputFormat - The outputFormat to set.

setPartitioner

public void setPartitioner(String partitioner)
Sets the job partitioner.

Parameters:
partitioner - The partitioner to set.

setFile

public void setFile(String[] files)
Sets the job files.

Parameters:
files - The cacheFile to set.

setArchive

public void setArchive(String[] archives)
Sets the job archives.

Parameters:
archives - The cacheArchive to set.

setConfiguration

public void setConfiguration(Configuration configuration)
Sets the Hadoop configuration to use.

Parameters:
configuration - The configuration to set.

setCmdEnv

public void setCmdEnv(Properties cmdEnv)
Sets the environment for the commands to be executed.

Parameters:
cmdEnv - The environment command/property to set.

setNumReduceTasks

public void setNumReduceTasks(Integer numReduceTasks)
Sets the job number of reducer tasks.

Parameters:
numReduceTasks - The numReduceTasks to set.

setLibJar

public void setLibJar(String[] libJars)
Sets the job jar libraries.

Parameters:
libJars - The libJars to set.

setProperties

public void setProperties(Properties properties)
Sets the configuration properties to use.

Parameters:
properties - The properties to set.