You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ferdy Galema <fe...@kalooga.com> on 2011/05/11 11:39:02 UTC

about HTable and HConnectionImplementation thread-safety

I understand HTable is not thread-safe. How about 
HConnectionImplementation? I presume it is thread-safe, because 
otherwise creating a HTable for each thread will only work when each 
thread uses it's own Configuration. (Since Configuration is mapped to a 
HConnectionImplementation). So, how does it exactly achieve 
thread-safety? For example, will N threads result in N zookeeper 
connections?

Secondly, are there any plans to improve HTable thread-safety / 
efficiency? I'm aware of asynchbase, but I think it would be very nice 
to have an efficient implementation out of the box.

Ferdy.

Re: about HTable and HConnectionImplementation thread-safety

Posted by Ferdy Galema <fe...@kalooga.com>.
Very useful thanks! Fixed the link:
http://zhihongyu.blogspot.com/2011/04/managing-connections-in-hbase-090-and.html


On 05/11/2011 03:33 PM, Ted Yu wrote:
> See
> http://zhihongyu.blogspot.com/2011/04/managing-connections-in-hbase-090-and.htmlfor
> your first question.
>
> On Wed, May 11, 2011 at 2:39 AM, Ferdy Galema<fe...@kalooga.com>wrote:
>
>> I understand HTable is not thread-safe. How about
>> HConnectionImplementation? I presume it is thread-safe, because otherwise
>> creating a HTable for each thread will only work when each thread uses it's
>> own Configuration. (Since Configuration is mapped to a
>> HConnectionImplementation). So, how does it exactly achieve thread-safety?
>> For example, will N threads result in N zookeeper connections?
>>
>> Secondly, are there any plans to improve HTable thread-safety / efficiency?
>> I'm aware of asynchbase, but I think it would be very nice to have an
>> efficient implementation out of the box.
>>
>> Ferdy.
>>

Re: about HTable and HConnectionImplementation thread-safety

Posted by Ted Yu <yu...@gmail.com>.
See
http://zhihongyu.blogspot.com/2011/04/managing-connections-in-hbase-090-and.htmlfor
your first question.

On Wed, May 11, 2011 at 2:39 AM, Ferdy Galema <fe...@kalooga.com>wrote:

> I understand HTable is not thread-safe. How about
> HConnectionImplementation? I presume it is thread-safe, because otherwise
> creating a HTable for each thread will only work when each thread uses it's
> own Configuration. (Since Configuration is mapped to a
> HConnectionImplementation). So, how does it exactly achieve thread-safety?
> For example, will N threads result in N zookeeper connections?
>
> Secondly, are there any plans to improve HTable thread-safety / efficiency?
> I'm aware of asynchbase, but I think it would be very nice to have an
> efficient implementation out of the box.
>
> Ferdy.
>