hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tsuna <tsuna...@gmail.com>
Subject Re: HTable.put(List<Put> puts) perform batch insert?
Date Tue, 01 Feb 2011 08:03:05 GMT
On Mon, Jan 31, 2011 at 5:19 PM, Ryan Rawson <ryanobjc@gmail.com> wrote:
> It just retrieves the current state of the buffer.  The buffer is
> mutated to remove successful edits as they occur, during an exception
> the ones that were determined to be successful were also removed.

htable.getWriteBuffer() isn't thread-safe (correct me if I'm wrong) so
be careful with it.

FWIW, asynchbase works differently: you get a callback for each and
every edit.  You can specify two callbacks: one for the success case,
and one callback to handle failures.  Also, it's thread-safe :)
The other cool thing in asynchbase is that it puts an upper bound on
the amount of time data can be buffered in the client.   After that
time has elapsed, the client will flush the writes to HBase.  This
improves liveness in user-facing applications by preventing edits from
sticking too long in the unflushed buffer of some client, while still
allowing for higher throughput through batching of edits.

Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

View raw message