On Tue, Mar 29, 2011 at 3:49 PM, Joe Pallas <[email protected]> wrote: > So: what should a multithreaded client do to be safe and not generate more > threads than are needed?
Consider trying asynchbase instead, if you didn't write too much code tied to the HTable stuff. https://github.com/stumbleupon/asynchbase asynchbase only creates 2*N threads, where N is the number of hardware threads on the machine. So on a 4 core machine, it'll create 8 threads. You only need one HBaseClient instance per HBase cluster you wanna interact with, regardless of how many tables you're gonna use. asynchbase is built from the ground up to be thread-safe and highly scalable, especially for applications with high write throughput requirements. I originally wrote it for OpenTSDB (http://opentsdb.net) and I saw very significant throughput improvements after switching from HTable to asynchbase. -- Benoit "tsuna" Sigoure Software Engineer @ www.StumbleUpon.com
