On Wed, May 2, 2012 at 2:32 AM, Michael Morello
<
michael...@gmail.com> wrote:
> A workaround is to call :
>
> Deferred<Object> ensureTableExists =
> hBaseClient.ensureTableExists(TABLE_NAME);
> ensureTableExists.joinUninterruptibly();
Yes you need to do this. You can get away without the Deferred and
simply write:
hBaseClient.ensureTableExists(TABLE_NAME).joinUninterruptibly();
The reason this is required is because if you send a bazillion writes
to asynchbase without first finding where the table is, every single
write will cause a meta lookup. As you found out, there is a
semaphore to try to rate-limit META lookups, but it's still not enough
to prevent you from causing what I call a "META storm".
The other solution would be to have asynchbase block until all
outstanding META lookups have completed, but one of the premises of
asynchbase is to never block, so I'm a little hesitant to add an
exception to the non-blocking guarantee. But I agree that, arguably,
asynchbase should do a better job at rate-limiting META lookups in
order to make your use case work without requiring a call to
ensureTableExists().
--
Benoit "tsuna" Sigoure
Software Engineer @
www.StumbleUpon.com