phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serega Sheypak <serega.shey...@gmail.com>
Subject Re: How to do true batch updates in Phoenix
Date Wed, 19 Aug 2015 22:05:42 GMT
I would suggest you to use
https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/BufferedMutator.html
instead of list of puts and share mutableBuffer across threads (it's
thread-safe). I reduced my response time from 30-40 ms to 4ms while using
buffferedmutator. It also sends mutations in async mode. :)

I meet the same problem. Can't force Phoenix to buffer upserts on
client-side and then send them to HBase in small batches.

2015-08-19 19:40 GMT+02:00 jeremy p <athomewithagroovebox@gmail.com>:

> Hello all,
>
> I need to do true batch updates to a Phoenix table.  By this, I mean
> sending a bunch of updates to HBase as part of a single request.  The HBase
> API offers this behavior with the Table.put(List<Put> puts) method.  I
> noticed PhoenixStatement exposes an executeBatch() method, however, this
> method just executes the batched statements one-by-one.  This will not
> deliver the performance that the HBase API exposes through their batch put
> method.
>
> What is the best way for me to do true batch updates to a Phoenix table?
> I need to do this programmatically, so I cannot use the command line bulk
> insert utility.
>
> --Jeremy
>

Mime
View raw message