hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Minkovsky <dminkov...@gmail.com>
Subject Can I tell when the client actually connected and ready to go?
Date Wed, 15 Jul 2015 23:42:04 GMT
I posted this question on Stack Overflow
a while ago but got no responses.  From SO:

I am using HBase 1.1.0 and create HBase client connections like this:

try {
    Configuration config = HBaseConfiguration.create();
    connection = ConnectionFactory.createConnection(config);
catch (IOException e) {
    logger.info("Error {}", e);

However, I noticed that when ZooKeeper and HBase Master/Region servers are
down, the catch clause is never reached. The code runs as if the connection
is made, and connection.isClosed() returns false. So:

- What happens when I use this connection? Are the RPC calls buffered and
retried at some interval in background?

- How can I tell whether the connection is actually ready for use? Should I
try to do this, or just use it? My inclination is not to run a client
service without the underlying datastores all actually ready, but perhaps
this is not the idea with the new HBase API.

- Under what conditions is the IOException catch actually reached?

My goal is to be able to fail fast!


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