Spring for Apache Hadoop

org.springframework.data.hadoop.hbase
Class HbaseConfigurationFactoryBean

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

public class HbaseConfigurationFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.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()
           
 org.apache.hadoop.conf.Configuration getObject()
           
 java.lang.Class<? extends org.apache.hadoop.conf.Configuration> getObjectType()
           
 boolean isSingleton()
           
 void setConfiguration(org.apache.hadoop.conf.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(java.util.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(java.lang.Integer port)
          Sets the HBase Zookeeper port for clients to connect to.
 void setZkQuorum(java.lang.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(org.apache.hadoop.conf.Configuration configuration)
Sets the Hadoop configuration to use.

Parameters:
configuration - The configuration to set.

destroy

public void destroy()
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean

setProperties

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

Parameters:
properties - The properties to set.

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

getObject

public org.apache.hadoop.conf.Configuration getObject()
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>

getObjectType

public java.lang.Class<? extends org.apache.hadoop.conf.Configuration> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.hadoop.conf.Configuration>

setZkQuorum

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

Spring for Apache Hadoop