is hbase 'checkAndPut' latency higher than simple 'put'? is hbase 'checkAndPut' latency higher than simple 'put'? hadoop hadoop

is hbase 'checkAndPut' latency higher than simple 'put'?


Yes the check and put latency will be higher than just a simple put. However how much higher will depend upon how much of the data is in the memstore and how much is in the block cache.

The checkAndMutate works like this:

  • get the row lock
  • Wait for all outstanding transactions to be ack'd
  • Get the cell needed
  • Compare them using the rules supplied
  • perform a put/delete

Since the last step if successful is performing a put, checkAndMutate will have some added cost. The get is (likely) the most expensive part of that. If you are able to add bloom filters and keep all of the index blocks in memory then you can make sure that get is as fast as possible.