Reply
New Contributor
Posts: 2
Registered: ‎04-11-2017
Accepted Solution

Kudu increment update support

hi,

Dose Kudu support  increment update?

 

For example, we have a table with two field, browser and visit count :

borwser   visitCount

firfox        10

 

And then, we got a new visit from firfox, the table will be update to:

borwser   visitCount

firfox        11

 

we want to do this update by increment operation, ranther then read the visitCount, add one and write it back.

 

Thanks in advance.

Cloudera Employee J-D
Cloudera Employee
Posts: 55
Registered: ‎07-08-2013

Re: Kudu increment update support

Hi,

 

Kudu currently doesn't support atomic increments or any kind of operation that reads a value and makes a decision based on that value with the guarantee that it won't change.

 

Thx,

 

J-D

Highlighted
New Contributor
Posts: 5
Registered: ‎09-28-2016

Re: Kudu increment update support

Hi, We also found Increment as a very useful operation in production. It can reduce row number. So why increment is not supported, is it on the plan?
Expert Contributor
Posts: 119
Registered: ‎07-01-2015

Re: Kudu increment update support

I think it is just because how Kudu is implemented. The visit count is not the primary key of the table. Nor the browser column. For atomic incrementing you have to have the data in one location on one server.

New Contributor
Posts: 1
Registered: ‎08-25-2017

Re: Kudu increment update support

"Nor the browser column" -- What if the "browser" column WAS the primary key?  Would increment be possible in similar fashion to upsert, the difference being that internally Kudu would read the existing value and add it to the increment value before saving?  

Cloudera Employee J-D
Cloudera Employee
Posts: 55
Registered: ‎07-08-2013

Re: Kudu increment update support


hindog wrote:

"Nor the browser column" -- What if the "browser" column WAS the primary key?  Would increment be possible in similar fashion to upsert, the difference being that internally Kudu would read the existing value and add it to the increment value before saving?  



The other Kudu limitation that this runs into is that row key columns cannot be modified. It would be somewhat easier to implement atomic increments on non-key columns, but then that means doing a lot of updates and it's not something Kudu excels at e.g. it supports modifying data but the higher the rate the slower the reads are.

Announcements