hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hsieh <...@cloudera.com>
Subject Re: [Discuss] HBase with multiple threads
Date Fri, 06 Jun 2014 22:57:39 GMT

Create one one HConnection for the process and then create an HTable
instance for each thread that uses the same HConnection. In newer hbase it
is HConnection.getTable(name), in older hbase it is new HTable(HConnection).

HTablePool is deprecated, and shouldn't really be used.


On Fri, Jun 6, 2014 at 3:01 PM, Hotec04 <hao.leng@dish.com> wrote:

> Hi HBase users,
> I try to implement multiple threads for HBase writing process, but looks
> like the table.flushCommites() breaks thread easily. Then I add a
> synchronized blocker for it, it flows but when I publish 50 messages, about
> 2 of them are missing...I am using HTablePool as well, so when every thread
> comes in, they grab one Htable but all Htables are using the same table.
> Any ideas on how to work with HTable put operation for multiple threads?
> Thank you!
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/Discuss-HBase-with-multiple-threads-tp4060081.html
> Sent from the HBase User mailing list archive at Nabble.com.

// Jonathan Hsieh (shay)
// HBase Tech Lead, Software Engineer, Cloudera
// jon@cloudera.com // @jmhsieh

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