You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Long kyo <ky...@gmail.com> on 2014/04/18 12:37:41 UTC

I have one question of HBase Client

Hi all,
I know 3 ways to multi puts into HBase table:
1. Array of Puts
2  batch method
3. mutateRow method

Question:
1. And the question here is which is best choice for multi puts, (speed and
perfomance)???
2. And when multi put into hbase table, the client make one or multi
request to Hbase master??? (about tcp request,... not socket)

Thanks All


-- 
Tạ Vũ Long (ター ヴー ロン)
Lớp IS1 - Việt Nhật
my contact number: 0984028809
email : kyo88kyo@gmail.com
yahoo:longdc2001

Re: I have one question of HBase Client

Posted by Nick Dimiduk <nd...@gmail.com>.
Array of puts method, HTable#put(List<Put>) actually, and
HTable#batch(List<? extends Row>, Object[]) are very similar. Both use the
AsyncProcess, an asynchronous means for sending their work to the cluster.
The primary difference is that the former is more respectful about managing
back-pressure from the cluster. The latter allows you to send other
mutation types in bulk, so it's also applicable for append, increment,
delete, in addition to put.

Neither method involves client interaction with the Master. Zookeeper may
be invoked to locate the META region, and the RegionServer hosting META
will be referenced to populate any uncached region locations.


On Fri, Apr 18, 2014 at 9:26 AM, Ted Yu <yu...@gmail.com> wrote:

> #3 is distinctive from the other two choices. See javadoc for RowMutations
> :
>
>  * Performs multiple mutations atomically on a single row.
>
>  * Currently {@link Put} and {@link Delete} are supported.
>
> while the other two methods are not limited to a single row.
>
> Cheers
>
>
> On Fri, Apr 18, 2014 at 3:37 AM, Long kyo <ky...@gmail.com> wrote:
>
> > Hi all,
> > I know 3 ways to multi puts into HBase table:
> > 1. Array of Puts
> > 2  batch method
> > 3. mutateRow method
> >
> > Question:
> > 1. And the question here is which is best choice for multi puts, (speed
> and
> > perfomance)???
> > 2. And when multi put into hbase table, the client make one or multi
> > request to Hbase master??? (about tcp request,... not socket)
> >
> > Thanks All
> >
> >
> > --
> > Tạ Vũ Long (ター ヴー ロン)
> > Lớp IS1 - Việt Nhật
> > my contact number: 0984028809
> > email : kyo88kyo@gmail.com
> > yahoo:longdc2001
> >
>

Re: I have one question of HBase Client

Posted by Ted Yu <yu...@gmail.com>.
#3 is distinctive from the other two choices. See javadoc for RowMutations :

 * Performs multiple mutations atomically on a single row.

 * Currently {@link Put} and {@link Delete} are supported.

while the other two methods are not limited to a single row.

Cheers


On Fri, Apr 18, 2014 at 3:37 AM, Long kyo <ky...@gmail.com> wrote:

> Hi all,
> I know 3 ways to multi puts into HBase table:
> 1. Array of Puts
> 2  batch method
> 3. mutateRow method
>
> Question:
> 1. And the question here is which is best choice for multi puts, (speed and
> perfomance)???
> 2. And when multi put into hbase table, the client make one or multi
> request to Hbase master??? (about tcp request,... not socket)
>
> Thanks All
>
>
> --
> Tạ Vũ Long (ター ヴー ロン)
> Lớp IS1 - Việt Nhật
> my contact number: 0984028809
> email : kyo88kyo@gmail.com
> yahoo:longdc2001
>