HBase is not a transactional datastore like you seem to think. Read this: http://hbase.apache.org/acid-semantics.html
--Suraj On Tue, Mar 8, 2011 at 12:05 AM, 梁景明 <[email protected]> wrote: > *< > http://hbase.apache.org/docs/r0.20.6/api/org/apache/hadoop/hbase/client/transactional/package-summary.html#package_description > > > *Is there any example about transaction in hbase? > > -------------------------------------------------------------------- > begin transaction > > Put p1=new Put("a".getBytes()); > p1.put("f1".getBytes(),new byte[0],"v1".getBytes()) > .................. > Put p2=new Put("b".getBytes()); > p2.put("f2".getBytes(),new byte[0],"v2".getBytes()) > > commit p1 in table1 and p2 in table2 > > end transaction > > ------------------------------------------------------------ > > thanks very much. >
