You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Tianying Chang <ty...@gmail.com> on 2014/01/22 19:09:49 UTC

Tall good with Scans, Wide good with Gets???

Hi,

I watched this youtube video http://www.youtube.com/watch?v=_HLoH_PgrLk by
Lars George. It is really good one!

I just have one thing still cannot understand. It said Tall is good for
Scan, Wide is good for Get. My understanding is that Scan and Get is using
the same code underlying. It first seek to the specific kv, check data,
after done, then do next() . Considering the underlying storage is same for
wide or tall, and the code to do scan/get is the same. why Tall is good for
Scan, and wide is good for Get?

Does anyone know why? This really puzzles me.

Thanks a lot!
Tian-Ying

Re: Tall good with Scans, Wide good with Gets???

Posted by Ted Yu <yu...@gmail.com>.
You're welcome.


On Wed, Jan 22, 2014 at 3:03 PM, Tianying Chang <ty...@gmail.com> wrote:

> Thanks Ted, This jira helped me to understand that claim much better now.
>
>
> On Wed, Jan 22, 2014 at 1:10 PM, Ted Yu <yu...@gmail.com> wrote:
>
> > For the follow-on question of #1, see HBASE-9488 : small scan.
> >
> > Cheers
> >
> >
> > On Wed, Jan 22, 2014 at 10:30 AM, Tianying Chang <ty...@gmail.com>
> > wrote:
> >
> > > Ted, Thanks for link!
> > >
> > > 1. the post said "Get will pread from HDFS where Scan will seek and
> read
> > > under lock (and only fall back to pread when it notices contention on
> the
> > > hfile)." It seems pread  is for highly concurrent small readers.  So
> this
> > > brings me a new question: does this mean that if my scan
> startKey/endKey
> > > only covers 10 rows, it is faster to run a getMultiple()???
> > >
> > >
> > > 2. Still confused why Tall is good for Scans, wide is good for Gets? I
> > > thought the underlying storage is stored in KV. so tall or wide
> shouldn't
> > > matter, right?
> > >
> > > Thanks
> > > Tian-Ying
> > >
> > >
> > > On Wed, Jan 22, 2014 at 10:12 AM, Ted Yu <yu...@gmail.com> wrote:
> > >
> > > > See
> > > >
> > > >
> > >
> >
> http://search-hadoop.com/m/nAAad2wRi03/Is+get+a+private+case+of+scan&subj=Re+Is+get+a+private+case+of+scan+
> > > >
> > > > Cheers
> > > >
> > > >
> > > > On Wed, Jan 22, 2014 at 10:09 AM, Tianying Chang <ty...@gmail.com>
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I watched this youtube video
> > > http://www.youtube.com/watch?v=_HLoH_PgrLkby
> > > > > Lars George. It is really good one!
> > > > >
> > > > > I just have one thing still cannot understand. It said Tall is good
> > for
> > > > > Scan, Wide is good for Get. My understanding is that Scan and Get
> is
> > > > using
> > > > > the same code underlying. It first seek to the specific kv, check
> > data,
> > > > > after done, then do next() . Considering the underlying storage is
> > same
> > > > for
> > > > > wide or tall, and the code to do scan/get is the same. why Tall is
> > good
> > > > for
> > > > > Scan, and wide is good for Get?
> > > > >
> > > > > Does anyone know why? This really puzzles me.
> > > > >
> > > > > Thanks a lot!
> > > > > Tian-Ying
> > > > >
> > > >
> > >
> >
>

Re: Tall good with Scans, Wide good with Gets???

Posted by Tianying Chang <ty...@gmail.com>.
Thanks Ted, This jira helped me to understand that claim much better now.


On Wed, Jan 22, 2014 at 1:10 PM, Ted Yu <yu...@gmail.com> wrote:

> For the follow-on question of #1, see HBASE-9488 : small scan.
>
> Cheers
>
>
> On Wed, Jan 22, 2014 at 10:30 AM, Tianying Chang <ty...@gmail.com>
> wrote:
>
> > Ted, Thanks for link!
> >
> > 1. the post said "Get will pread from HDFS where Scan will seek and read
> > under lock (and only fall back to pread when it notices contention on the
> > hfile)." It seems pread  is for highly concurrent small readers.  So this
> > brings me a new question: does this mean that if my scan startKey/endKey
> > only covers 10 rows, it is faster to run a getMultiple()???
> >
> >
> > 2. Still confused why Tall is good for Scans, wide is good for Gets? I
> > thought the underlying storage is stored in KV. so tall or wide shouldn't
> > matter, right?
> >
> > Thanks
> > Tian-Ying
> >
> >
> > On Wed, Jan 22, 2014 at 10:12 AM, Ted Yu <yu...@gmail.com> wrote:
> >
> > > See
> > >
> > >
> >
> http://search-hadoop.com/m/nAAad2wRi03/Is+get+a+private+case+of+scan&subj=Re+Is+get+a+private+case+of+scan+
> > >
> > > Cheers
> > >
> > >
> > > On Wed, Jan 22, 2014 at 10:09 AM, Tianying Chang <ty...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I watched this youtube video
> > http://www.youtube.com/watch?v=_HLoH_PgrLkby
> > > > Lars George. It is really good one!
> > > >
> > > > I just have one thing still cannot understand. It said Tall is good
> for
> > > > Scan, Wide is good for Get. My understanding is that Scan and Get is
> > > using
> > > > the same code underlying. It first seek to the specific kv, check
> data,
> > > > after done, then do next() . Considering the underlying storage is
> same
> > > for
> > > > wide or tall, and the code to do scan/get is the same. why Tall is
> good
> > > for
> > > > Scan, and wide is good for Get?
> > > >
> > > > Does anyone know why? This really puzzles me.
> > > >
> > > > Thanks a lot!
> > > > Tian-Ying
> > > >
> > >
> >
>

Re: Tall good with Scans, Wide good with Gets???

Posted by Ted Yu <yu...@gmail.com>.
For the follow-on question of #1, see HBASE-9488 : small scan.

Cheers


On Wed, Jan 22, 2014 at 10:30 AM, Tianying Chang <ty...@gmail.com> wrote:

> Ted, Thanks for link!
>
> 1. the post said "Get will pread from HDFS where Scan will seek and read
> under lock (and only fall back to pread when it notices contention on the
> hfile)." It seems pread  is for highly concurrent small readers.  So this
> brings me a new question: does this mean that if my scan startKey/endKey
> only covers 10 rows, it is faster to run a getMultiple()???
>
>
> 2. Still confused why Tall is good for Scans, wide is good for Gets? I
> thought the underlying storage is stored in KV. so tall or wide shouldn't
> matter, right?
>
> Thanks
> Tian-Ying
>
>
> On Wed, Jan 22, 2014 at 10:12 AM, Ted Yu <yu...@gmail.com> wrote:
>
> > See
> >
> >
> http://search-hadoop.com/m/nAAad2wRi03/Is+get+a+private+case+of+scan&subj=Re+Is+get+a+private+case+of+scan+
> >
> > Cheers
> >
> >
> > On Wed, Jan 22, 2014 at 10:09 AM, Tianying Chang <ty...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I watched this youtube video
> http://www.youtube.com/watch?v=_HLoH_PgrLkby
> > > Lars George. It is really good one!
> > >
> > > I just have one thing still cannot understand. It said Tall is good for
> > > Scan, Wide is good for Get. My understanding is that Scan and Get is
> > using
> > > the same code underlying. It first seek to the specific kv, check data,
> > > after done, then do next() . Considering the underlying storage is same
> > for
> > > wide or tall, and the code to do scan/get is the same. why Tall is good
> > for
> > > Scan, and wide is good for Get?
> > >
> > > Does anyone know why? This really puzzles me.
> > >
> > > Thanks a lot!
> > > Tian-Ying
> > >
> >
>

Re: Tall good with Scans, Wide good with Gets???

Posted by Tianying Chang <ty...@gmail.com>.
Ted, Thanks for link!

1. the post said "Get will pread from HDFS where Scan will seek and read
under lock (and only fall back to pread when it notices contention on the
hfile)." It seems pread  is for highly concurrent small readers.  So this
brings me a new question: does this mean that if my scan startKey/endKey
only covers 10 rows, it is faster to run a getMultiple()???


2. Still confused why Tall is good for Scans, wide is good for Gets? I
thought the underlying storage is stored in KV. so tall or wide shouldn't
matter, right?

Thanks
Tian-Ying


On Wed, Jan 22, 2014 at 10:12 AM, Ted Yu <yu...@gmail.com> wrote:

> See
>
> http://search-hadoop.com/m/nAAad2wRi03/Is+get+a+private+case+of+scan&subj=Re+Is+get+a+private+case+of+scan+
>
> Cheers
>
>
> On Wed, Jan 22, 2014 at 10:09 AM, Tianying Chang <ty...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I watched this youtube video http://www.youtube.com/watch?v=_HLoH_PgrLkby
> > Lars George. It is really good one!
> >
> > I just have one thing still cannot understand. It said Tall is good for
> > Scan, Wide is good for Get. My understanding is that Scan and Get is
> using
> > the same code underlying. It first seek to the specific kv, check data,
> > after done, then do next() . Considering the underlying storage is same
> for
> > wide or tall, and the code to do scan/get is the same. why Tall is good
> for
> > Scan, and wide is good for Get?
> >
> > Does anyone know why? This really puzzles me.
> >
> > Thanks a lot!
> > Tian-Ying
> >
>

Re: Tall good with Scans, Wide good with Gets???

Posted by Ted Yu <yu...@gmail.com>.
See
http://search-hadoop.com/m/nAAad2wRi03/Is+get+a+private+case+of+scan&subj=Re+Is+get+a+private+case+of+scan+

Cheers


On Wed, Jan 22, 2014 at 10:09 AM, Tianying Chang <ty...@gmail.com> wrote:

> Hi,
>
> I watched this youtube video http://www.youtube.com/watch?v=_HLoH_PgrLk by
> Lars George. It is really good one!
>
> I just have one thing still cannot understand. It said Tall is good for
> Scan, Wide is good for Get. My understanding is that Scan and Get is using
> the same code underlying. It first seek to the specific kv, check data,
> after done, then do next() . Considering the underlying storage is same for
> wide or tall, and the code to do scan/get is the same. why Tall is good for
> Scan, and wide is good for Get?
>
> Does anyone know why? This really puzzles me.
>
> Thanks a lot!
> Tian-Ying
>