There is no transaction support in HBase, not across tables, not
within tables.  Each row is guaranteed to be atomically updated, but
that is it.

-ryan

On Sun, Jan 30, 2011 at 8:38 PM, Jim X <[email protected]> wrote:
> For one table, I can implement it like:
>   HTable htable = ...;
>   List<Put> list = getPuts();
>   htable.setAutoFlush(true);
>   htable.put(list);
>   htable.flushCommits();
>
> If my batch comes across multiple tables, how do I implement it in one
> transaction?
>
> Jim
>
> On Sun, Jan 30, 2011 at 11:33 PM, Jim X <[email protected]> wrote:
>> Thanks. Yes. This is what I want to know.
>>
>> On Sun, Jan 30, 2011 at 11:10 PM, JinChao Wen <[email protected]> 
>> wrote:
>>> see htable.put(List<Put> put)
>>>
>>> if you set autoFlush=true, or number of puts you add to htable is exceed the
>>> writeBufferSize of htable.
>>> The puts will be flushed.
>>>
>>>
>>>
>>> 2011/1/31 Jim X <[email protected]>
>>>
>>>> Hi, HBase users,
>>>>
>>>>     JDBC provides batch operation API. I am assigned to convert a
>>>> JDBC batch implementation into HBase. Does HBase provide some APIs
>>>> like PreparedStatement.addBatch() in JDBC? How do I implement HBase
>>>> batch process in one transaction?
>>>>
>>>>
>>>> Jim
>>>>
>>>
>>
>

Reply via email to