Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Put and Increment atomically


Copy link to this message
-
Put and Increment atomically
Hey guys,
I want to insert new columns into a row:fam and increment 2 of them atomically.
In other words, I am using columns as entries and I want to count them and their
sizes.

For example, I want to insert these new columns:
row1:f1:c1 = h_v_j
row1:f1:c2 = g_r_w
row1:f1:c3 = z_l_p
row1:f1:c4 = n_m_j

*The values are fixed size information which I used '_' as separator above.

But I also want to keep track of how many columns do I have and sum one of
the information.
row1:f1:count = Increment(4)
row1:f1:size = Increment(j+w+p+j)

I can do them separately, send the puts and then send the increments, but
I would like to know if it is possible to do it atomically.

I did some search and found the link below, but it only talks about put/delete.
Why not adding increment?
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/RowMutations.html

I don't know if it is clear enough.

Thanks,
Pablo