hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcelo Valle (BLOOMBERG/ LONDON)" <mvallemil...@bloomberg.net>
Subject HBase connection pool
Date Wed, 25 Feb 2015 17:41:28 GMT
In HBase API, does 1 HTable object means 1 connection to each region server (just for 1 table)?

The docs say (http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/client/HTable.html):
"This class is not thread safe for reads nor write."

I got confused, as I saw there is a HTablePool class, but it's only for a table as well, can't
connections be reused for more than 1 table? 

In my java application, I used ThreadLocal variables (ThreadLocal<HTable>) to create
an HTable variable per thread. If I do several operations on each thread, I should still use
the same connection, right?

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