Hbase client with a connection pool Hbase连接池
<dependency>
<groupId>io.wangxin</groupId>
<artifactId>hbase-client</artifactId>
<version>${hbase-client.version}</version>
</dependency>
版本号:
0.1.0-SNAPSHOT
功能:
版本号:
0.1.0-SNAPSHOT
功能:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- hbase 数据源配置 -->
<bean id="hbasePoolConfig" class="io.wangxin.hbase.client.pool.HbasePoolConfig">
<property name="maxTotal" value="20"></property>
<property name="maxIdle" value="5"></property>
<property name="maxWaitMillis" value="1000"></property>
<property name="testOnBorrow" value="true"></property>
</bean>
<!-- hbase 数据源连接池 -->
<bean id="hbasePool" class="io.wangxin.hbase.client.HbasePool">
<!--zkQuorum-->
<constructor-arg index="0" type="java.lang.String" value="${hbase.zkQuorum}"></constructor-arg>
<!--zkClientPort-->
<constructor-arg index="1" type="java.lang.String" value="${hbase.zkClientPort}"></constructor-arg>
<constructor-arg index="2" ref="hbasePoolConfig"></constructor-arg>
</bean>
</beans>