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
