hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaojinchao <gaojinc...@huawei.com>
Subject about HBaseAdmin
Date Thu, 19 May 2011 01:48:10 GMT
The api HBaseAdmin has modified, So we should add some introduce:

If new a instance , it needs delete connection.

HBaseAdmin hba = new HBaseAdmin(conf);

HConnectionManager.deleteConnection(hba.getConfiguration(), false);

public HBaseAdmin (Configuration c)

  throws MasterNotRunningException, ZooKeeperConnectionException {

    this.conf = HBaseConfiguration.create(c);                           // new conf, so It
will create a new connection

    this.connection = HConnectionManager.getConnection(this.conf);

    this.pause = this.conf.getLong("hbase.client.pause", 1000);

    this.numRetries = this.conf.getInt("hbase.client.retries.number", 10);

    this.retryLongerMultiplier = this.conf.getInt("hbase.client.retries.longer.multiplier",



In my cluster.

New HBaseAdmin instance will create a new connection for zk.( we share HBaseConfiguration
for multithread, It is ok for 0.90.2)

But, In 0.90.3 throw exception:

checkHtableState happen an exception. begin reconnect. exception info:org.apache.hadoop.hbase.ZooKeeperConnectionException:
HBase is able to connect to ZooKeeper but the connection closes immediately. This could be
a sign that the server has too many connections (30 is the default). Consider inspecting your
ZK server logs for that error and then make sure you are reusing HBaseConfiguration as often
as you can. See HTable's javadoc for more information

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message