I just want to be clear how HBASE checkAndPut works, based on the documentation of HBASE,
Atomically checks if a row/family/qualifier value matches the expected value. If it does, it adds the put. If the passed value is null, the check is for the lack of column (ie: non-existance)
When it says "Atomically", i assume it will lock and isolate the row and do the comparison before it do the put to prevent any other operation for this row. Also, checkAndPut works for checking non-existence, if the row key is not existing, what it will isolate/lock?
I have 2 theory on this:
Either HBASE checkAndPut don't isolate any row if its not existing, does it mean it is possible that when you do checkAnPut on the same row that is not existing at the same time, both will be processed successfully?
Is it isolating by row key?
I just wanted to confirm which is the correct implementation but for me the ideal would be the second one.
Or HBASE checkAndPut is not ideal to use for checking the existence of a row? Maybe it is only ideal to use when a row is existing, and only checking the family/qualifier? Because the JAVA API looks like this.