org.springframework.data.hadoop.cascading
Class HadoopFlowFactoryBean

java.lang.Object
  extended by org.springframework.data.hadoop.cascading.HadoopFlowFactoryBean
All Implemented Interfaces:
BeanNameAware, FactoryBean<HadoopFlow>, InitializingBean

public class HadoopFlowFactoryBean
extends Object
implements BeanNameAware

Factory for declarative HadoopFlow creation. Usually used with a Cascade. Note the flow is not started.

Author:
Costin Leau

Constructor Summary
HadoopFlowFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 T getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setBeanName(String name)
           
 void setConfiguration(Configuration configuration)
          Sets the configuration.
 void setDefinition(FlowDef flowDef)
          Sets the flow definition.
 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 setJarSetup(boolean jarSetup)
          Indicates whether the application jarshould be set for this flow.
 void setJobPoolingInterval(Long jobPoolingInterval)
          Sets the job pooling interval.
 void setListeners(Collection<FlowListener> listeners)
          Sets the listeners.
 void setMaxConcurrentSteps(Integer maxConcurrentSteps)
          Sets the max concurrent steps.
 void setPriority(Integer priority)
          Sets the flow submit priority.
 void setProperties(Properties properties)
          Sets the properties.
 void setSink(Tap sink)
           
 void setSinks(Map<String,Tap> sinks)
          Sets the sinks.
 void setSkipStrategy(FlowSkipStrategy skipStrategy)
          Sets the skip strategy.
 void setSource(Tap source)
          Sets the source.
 void setSources(Map<String,Tap> sources)
          Sets the sources.
 void setStepStrategy(FlowStepStrategy stepStrategy)
          Sets the step strategy.
 void setTail(Pipe tail)
          Sets the tail.
 void setTails(Collection<Pipe> tails)
          Sets the tails.
 void setTraps(Map<String,Tap> traps)
          Sets the traps.
 void setWriteDOT(String writeDOT)
          Sets the write dot.
 void setWriteStepsDOT(String writeStepsDOT)
          Sets the write steps dot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HadoopFlowFactoryBean

public HadoopFlowFactoryBean()
Method Detail

setBeanName

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

setConfiguration

public void setConfiguration(Configuration configuration)
Sets the configuration.

Parameters:
configuration - The configuration to set.

setProperties

public void setProperties(Properties properties)
Sets the properties.

Parameters:
properties - The properties to set.

setMaxConcurrentSteps

public void setMaxConcurrentSteps(Integer maxConcurrentSteps)
Sets the max concurrent steps.

Parameters:
maxConcurrentSteps - The maxConcurrentSteps to set.

setJobPoolingInterval

public void setJobPoolingInterval(Long jobPoolingInterval)
Sets the job pooling interval.

Parameters:
jobPoolingInterval - The jobPoolingInterval to set.

setSources

public void setSources(Map<String,Tap> sources)
Sets the sources.

Parameters:
sources - The sources to set.

setSource

public void setSource(Tap source)
Sets the source.

Parameters:
source - The source to set.

setSinks

public void setSinks(Map<String,Tap> sinks)
Sets the sinks.

Parameters:
sinks - The sinks to set.

setSink

public void setSink(Tap sink)

setTraps

public void setTraps(Map<String,Tap> traps)
Sets the traps.

Parameters:
traps - The traps to set.

setTails

public void setTails(Collection<Pipe> tails)
Sets the tails.

Parameters:
tails - The tails to set.

setTail

public void setTail(Pipe tail)
Sets the tail.

Parameters:
tail - the new tail

setDefinition

public void setDefinition(FlowDef flowDef)
Sets the flow definition. Useful for programatically setting up the flow and then letting Spring do the configuration wiring.

Parameters:
flowDef -

setJarByClass

public void setJarByClass(Class<?> jarClass)
Determines the job jar (available on the classpath) based on the given class.

Parameters:
jarClass - The jarClass to set.

setJar

public void setJar(Resource jar)
Sets the job jar (which might not be on the classpath).

Parameters:
jar - The jar to set.

setJarSetup

public void setJarSetup(boolean jarSetup)
Indicates whether the application jarshould be set for this flow. By default it is true, meaning the factory will use the user provided settings (setJar(Resource) and setJarByClass(Class) or falling back to its own discovery mechanism if the above are not setup. When running against a cluster where cascading is already present, turn this to false to avoid shipping the library jar with the job.

Parameters:
jarSetup - whether to setup the application jar (based on the user settings) or not

getObject

public T getObject()
                            throws Exception
Specified by:
getObject in interface FactoryBean<T extends Flow<?>>
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<T extends Flow<?>>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<T extends Flow<?>>

afterPropertiesSet

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

setSkipStrategy

public void setSkipStrategy(FlowSkipStrategy skipStrategy)
Sets the skip strategy.

Parameters:
skipStrategy - The skipStrategy to set.

setStepStrategy

public void setStepStrategy(FlowStepStrategy stepStrategy)
Sets the step strategy.

Parameters:
stepStrategy - The stepStrategy to set.

setListeners

public void setListeners(Collection<FlowListener> listeners)
Sets the listeners.

Parameters:
listeners - The listeners to set.

setWriteDOT

public void setWriteDOT(String writeDOT)
Sets the write dot.

Parameters:
writeDOT - the new write dot

setWriteStepsDOT

public void setWriteStepsDOT(String writeStepsDOT)
Sets the write steps dot.

Parameters:
writeStepsDOT - the new write steps dot

setPriority

public void setPriority(Integer priority)
Sets the flow submit priority.

Parameters:
priority - flow priority