org.springframework.data.hadoop.test.support
Class HadoopClusterFactoryBean

java.lang.Object
  extended by org.springframework.data.hadoop.test.support.HadoopClusterFactoryBean
All Implemented Interfaces:
DisposableBean, FactoryBean<HadoopCluster>, InitializingBean

public class HadoopClusterFactoryBean
extends Object
implements InitializingBean, DisposableBean, FactoryBean<HadoopCluster>

Factory bean building Hadoop mini clusters.

Author:
Janne Valkealahti

Constructor Summary
HadoopClusterFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 StandaloneHadoopCluster getObject()
           
 Class<HadoopCluster> 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

HadoopClusterFactoryBean

public HadoopClusterFactoryBean()
Method Detail

getObject

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

getObjectType

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

isSingleton

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

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