in both 0.20.6 and 0.90 there's exactly checkAndPut. Checkout HTable class.
On 1/31/11 4:00 PM, Hiller, Dean (Contractor) wrote: > 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. > -- Claudio Martella Digital Technologies Unit Research & Development - Analyst TIS innovation park Via Siemens 19 | Siemensstr. 19 39100 Bolzano | 39100 Bozen Tel. +39 0471 068 123 Fax +39 0471 068 129 [email protected] http://www.tis.bz.it Short information regarding use of personal data. According to Section 13 of Italian Legislative Decree no. 196 of 30 June 2003, we inform you that we process your personal data in order to fulfil contractual and fiscal obligations and also to send you information regarding our services and events. Your personal data are processed with and without electronic means and by respecting data subjects' rights, fundamental freedoms and dignity, particularly with regard to confidentiality, personal identity and the right to personal data protection. At any time and without formalities you can write an e-mail to [email protected] in order to object the processing of your personal data for the purpose of sending advertising materials and also to exercise the right to access personal data and other rights referred to in Section 7 of Decree 196/2003. The data controller is TIS Techno Innovation Alto Adige, Siemens Street n. 19, Bolzano. You can find the complete information on the web site www.tis.bz.it.
