A fully asynchronous, non-blocking, thread-safe, high-performance HBase client.
Clone or download
djova and manolama expose `hbase.ipc.client.connection.idle_{read|write}_timeout`
**Problem**: `RegionClient` doesn't disconnect in the case of a half-open TCP connection, which we see when a Region Server goes offline abruptly without gracefully closing its TCP connections. Even with `hbase.hbase.ipc.client.connection.idle_timeout` being set, an application with a heavy request load will keep talking to the channel and `IdleState.ALL_IDLE` will never be triggered, meaning the `RegionClient` will never be closed even after HBase has areadly recovered and reassigned the regions to other Region Servers.

One way to cause `IdleStat.ALL_IDLE` to trigger is by setting `hbase.region_client.inflight_limit`, which once reached will prevent further writes to the channel, thereby triggering `IdleState.ALL_IDLE`; however, this is isn't good enough as different clients/applications have different write loads, making it difficult to figure out reasonable inflight limits to apply everywhere.

**Solution**: set the new `hbase.ipc.client.connection.read_timeout`, allowing us to detect when a Region Server has stopped responding without requiring us to stop writing to it as well. We now close the channel on any `IdleState`.

We don't really need `hbase.ipc.client.connection.write_timeout`, but since we're exposing `readerIdleTimeSeconds` and `allIdleTimeSeconds`, might as well expose `writerIdleTimeSeconds` for completeness.
Latest commit d8d4703 Jun 19, 2018

README.md

Asynchronous HBase

This is an alternative Java library to use HBase in applications that require a fully asynchronous, non-blocking, thread-safe, high-performance HBase API.

This HBase client differs significantly from HBase's client (HTable). Switching to it is not easy as it requires to rewrite all the code that was interacting with any HBase API. This pays off in applications that are asynchronous by nature or that want to use several threads to interact efficiently with HBase.

Documentation can be found under http://opentsdb.github.io/asynchbase/

Please read the Javadoc starting from the HBaseClient class. This class replaces all your HTable instances. Unlike HTable, you should have only one instance of HBaseClient in your application, regardless of the number of tables or threads you want to use. The Javadoc also spells out rules you have to follow in order to use the API properly in a multi-threaded application.

The GitHub repo branches are laid out as follows:

  • maintenance: This was the last stable version of AsyncHBase and should only have bug fix PRs created against it. Bugs should also be patched in master and next.

  • master: This is the current stable version of AsyncHBase and should only have bug fix PRs created against it. Bug should also be patched in the next branch.

  • next: This is the development version of AsyncHBase and all new features or API changes should be written against this.