Spring for Apache Hadoop

org.springframework.yarn.test.support
Class YarnClusterFactoryBean

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

public class YarnClusterFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<YarnCluster>

Factory bean building Yarn mini clusters.

Author:
Janne Valkealahti

Constructor Summary
YarnClusterFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 StandaloneYarnCluster getObject()
           
 java.lang.Class<YarnCluster> getObjectType()
           
 boolean isSingleton()
           
 void setAutoStart(boolean autoStart)
          Set whether cluster should be started automatically by this factory instance.
 void setClusterId(java.lang.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 java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<YarnCluster>
Throws:
java.lang.Exception

getObjectType

public java.lang.Class<YarnCluster> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<YarnCluster>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<YarnCluster>

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

destroy

public void destroy()
             throws java.lang.Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
java.lang.Exception

setClusterId

public void setClusterId(java.lang.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

Spring for Apache Hadoop