I posted this question on Stack Overflow
<http://stackoverflow.com/questions/30869878/when-is-an-hbase-client-connection-actually-ready-to-use>
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!
Thanks