hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de Souza Medeiros Andre <andre.medei...@aalto.fi>
Subject Performance issues of prepending a table
Date Wed, 18 Apr 2012 13:59:17 GMT
Hi all,

For some specific reason, I have a HBase table that should be frequently prepended. The row
keys in this table are long integers (converted to bytes of course). "Prepend" is an operation
that does the following:
1. Scans the table just for the purpose of getting the row key X of the first row, then stops
the scan.
2. CheckAndSet on X-1, checking if row X-1 is null and putting data at row key X-1.
3. If the CAS failed, try CAS on X-2, etc.

I'd like to know if there are any obvious performance drawbacks with this approach, compared
to inserting rows randomly in the table. With "obvious performance drawbacks" I mean something
that doesn't need to be benchmarked to know its effects.

I am aware that scanning plus CAS will be slower than a simple Put, but I'd like to know if
prepending has any negative effect regarding region management and misc.

Thank you,
Andre Medeiros

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message