I was wondering if there was a function in hbase that would translate to
running this code "atomically" on the "server side"...
checkAndPut(byte[] key, byte[] previousValue, byte[] newValue)
OR maybe there is something "similar" to the code below in hbase????
such that this code is run(so I would 1. Get the latest value in db and
2. my put would fail in cases where another server put it first)....
* if (previousValue == null && !map.containsKey(key))
* return map.put(key, value);
* else if(previousValue != null &&
previousValue.equals(map.get(key)))
* return map.put(key, value);
* else
* return map.get(key);
This message and any attachments are intended only for the use of the addressee
and
may contain information that is privileged and confidential. If the reader of
the
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.