Re: How to do true batch updates in Phoenix

2015-08-19 Thread ALEX K
I'm using the same solution as Samarth suggested (commit batching), it brings down latency per single row upsert from 50ms to 5ms (averaged after batching) On Wed, Aug 19, 2015 at 7:11 PM, Samarth Jain wrote: > You can do this via phoenix by doing something like this: > > try (Connection conn =

Re: How to do true batch updates in Phoenix

2015-08-19 Thread Samarth Jain
You can do this via phoenix by doing something like this: try (Connection conn = DriverManager.getConnection(url)) { conn.setAutoCommit(false); int batchSize = 0; int commitSize = 1000; // number of rows you want to commit per batch. Change this value according to your needs. while (there are reco

Re: How to do true batch updates in Phoenix

2015-08-19 Thread Serega Sheypak
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

Buffer upserts on client side and send to hbase

2015-08-19 Thread Serega Sheypak
Hi, reading: https://phoenix.apache.org/language/ confused with stmt: Otherwise, data is buffered on the client and, if auto commit is on, committed in row batches as specified by the UpsertBatchSize connection property (or the phoenix.mutate.upsertBatchSize HBase config property which defaults t

What to watch out for when writing to a phoenix table from the HBase API

2015-08-19 Thread jeremy p
Hello all, I'm in a situation where I need to bypass the Phoenix JDBC driver and write directly to a Phoenix table through the HBase API using Get and Put operations. However, I do not want to mess up Phoenix or any of its internal record keeping. What are some things I need to watch out for? W

How to do true batch updates in Phoenix

2015-08-19 Thread jeremy p
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 puts) method. I noticed PhoenixStatement exposes an executeBatch() method, however, this met

Re: Problem using more than one user defined functions in a query

2015-08-19 Thread Anchal Agrawal
Hi Rajmund, This is being tracked at the JIRA ticket - https://issues.apache.org/jira/browse/PHOENIX-2151. I'm also facing the same issue. Please add your comments/test cases to the ticket as necessary. Rajeshbabu could not reproduce the error, so I have sent him an email with my UDFs and he is

Problem using more than one user defined functions in a query

2015-08-19 Thread Bocsi Rajmund
Hi, I'm using phoenix-4.4.0-HBase-1.0 with hbase-1.0.1.1 and I experienced a strange problem. I created a view from the existing hbase table as it is suggested in the FAQ. In my database the row id (PK) contains the client id and the timestamp of the record among other pieces of informations.