hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim X <jim.p...@gmail.com>
Subject Re: How the batch operations are implemented in HBase?
Date Mon, 31 Jan 2011 04:38:57 GMT
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 <jim.pxie@gmail.com> wrote:
> Thanks. Yes. This is what I want to know.
>
> On Sun, Jan 30, 2011 at 11:10 PM, JinChao Wen <wenjinchao0418@gmail.com> 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 <jim.pxie@gmail.com>
>>
>>> 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
>>>
>>
>

Mime
View raw message