Thanks tsuna, I know the HTable class is not thread-safe, so in my test code, each thread new a HTable instance to put data. I think there is no thread-safe issue.
Last night, I used the same test program to test a previous version hbase-0.89.20100924+28, everything is fine. I am also interesting in asynchbase .... Thanks. On Fri, Jan 28, 2011 at 8:22 AM, tsuna <[email protected]> wrote: > On Thu, Jan 27, 2011 at 12:25 AM, Schubert Zhang <[email protected]> > wrote: > > The update: > > > > If I start 1 or 2 or 4 client threads (each have a HTable instance), > normal. > > > > If I start 8 or more client threads (each have a HTable instance), the > put > > operations hang-up. > > Your stack trace seems to indicate that you didn't synchronize on the > HTable instance before calling put(). > HTable isn't thread-safe, you need some synchronization in there. > Alternatively, if you don't mind rewriting the part of your code that > interacts with HTable, you could replace it with asynchbase > (https://github.com/stumbleupon/asynchbase), an alternative HBase > client library that was written to be thread-safe from the ground up. > > -- > Benoit "tsuna" Sigoure > Software Engineer @ www.StumbleUpon.com <http://www.stumbleupon.com/> >
