Spring for Apache Hadoop

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

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

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

Factory bean building Hadoop mini clusters.

Author:
Janne Valkealahti

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

HadoopClusterFactoryBean

public HadoopClusterFactoryBean()
Method Detail

getObject

public StandaloneHadoopCluster getObject()
                                  throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<HadoopCluster>
Throws:
java.lang.Exception

getObjectType

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

isSingleton

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

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