org.springframework.data.hadoop.hbase
Class HbaseConfigurationFactoryBean

java.lang.Object
  extended by org.springframework.data.hadoop.hbase.HbaseConfigurationFactoryBean
All Implemented Interfaces:
DisposableBean, FactoryBean<Configuration>, InitializingBean

public class HbaseConfigurationFactoryBean
extends Object
implements InitializingBean, DisposableBean, FactoryBean<Configuration>

Factory for creating HBase specific configuration. By default cleans up any connection associated with the current configuration.

Author:
Costin Leau
See Also:
HConnectionManager

Constructor Summary
HbaseConfigurationFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 Configuration getObject()
           
 Class<? extends Configuration> getObjectType()
           
 boolean isSingleton()
           
 void setConfiguration(Configuration configuration)
          Sets the Hadoop configuration to use.
 void setDeleteConnection(boolean deleteConnection)
          Indicates whether the potential connection created by this config is destroyed at shutdown (default).
 void setProperties(Properties properties)
          Sets the configuration properties.
 void setStopProxy(boolean stopProxy)
          Indicates whether, when/if the associated connection is destroyed, whether the proxy is stopped or not.
 void setZkPort(Integer port)
          Sets the HBase Zookeeper port for clients to connect to.
 void setZkQuorum(String quorum)
          Sets the HBase Zookeeper Quorum host(s).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HbaseConfigurationFactoryBean

public HbaseConfigurationFactoryBean()
Method Detail

setDeleteConnection

public void setDeleteConnection(boolean deleteConnection)
Indicates whether the potential connection created by this config is destroyed at shutdown (default).

Parameters:
deleteConnection - The deleteConnection to set.

setStopProxy

public void setStopProxy(boolean stopProxy)
Indicates whether, when/if the associated connection is destroyed, whether the proxy is stopped or not.

Parameters:
stopProxy - The stopProxy to set.

setConfiguration

public void setConfiguration(Configuration configuration)
Sets the Hadoop configuration to use.

Parameters:
configuration - The configuration to set.

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

setProperties

public void setProperties(Properties properties)
Sets the configuration properties.

Parameters:
properties - The properties to set.

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

getObject

public Configuration getObject()
Specified by:
getObject in interface FactoryBean<Configuration>

getObjectType

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

isSingleton

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

setZkQuorum

public void setZkQuorum(String quorum)
Sets the HBase Zookeeper Quorum host(s). If not specified, the default value (picked the the classpath) is used.

Parameters:
quorum - HBase ZK quorum hosts.

setZkPort

public void setZkPort(Integer port)
Sets the HBase Zookeeper port for clients to connect to. If not specified, the default value (picked from the classpath) is used.

Parameters:
port - HBase ZK client port.