org.springframework.yarn.test.support
Class YarnClusterFactoryBean

java.lang.Object
  extended by org.springframework.yarn.test.support.YarnClusterFactoryBean
All Implemented Interfaces:
DisposableBean, FactoryBean<YarnCluster>, InitializingBean

public class YarnClusterFactoryBean
extends Object
implements InitializingBean, DisposableBean, FactoryBean<YarnCluster>

Factory bean building Yarn mini clusters.

Author:
Janne Valkealahti

Constructor Summary
YarnClusterFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 StandaloneYarnCluster getObject()
           
 Class<YarnCluster> getObjectType()
           
 boolean isSingleton()
           
 void setAutoStart(boolean autoStart)
          Set whether cluster should be started automatically by this factory instance.
 void setClusterId(String clusterId)
          Sets the cluster id.
 void setNodes(int nodes)
          Sets the number of nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YarnClusterFactoryBean

public YarnClusterFactoryBean()
Method Detail

getObject

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

getObjectType

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

isSingleton

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

afterPropertiesSet

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

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface DisposableBean
Throws:
Exception

setClusterId

public void setClusterId(String clusterId)
Sets the cluster id. Id must be unique within running clusters.

Parameters:
clusterId - the cluster id

setAutoStart

public void setAutoStart(boolean autoStart)
Set whether cluster should be started automatically by this factory instance. Default setting is false.

Parameters:
autoStart - the flag if cluster should be started automatically

setNodes

public void setNodes(int nodes)
Sets the number of nodes.

Parameters:
nodes - the number of nodes