You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Vimal Jain <vk...@gmail.com> on 2014/03/20 07:22:24 UTC

A question about Scan

Hi,
I want to run a scan on table and get all rows for whom there is a value
set in one particular column qualifier.

I am using something like this ,

Scan s = new Scan();
s.addColum(cf1,cq1) // cf1:cq1 is the column i am looking for
Then i am iterating over ResultScanner and getting Result objects.

Will this return me all rows which has a value for that particular column
qualifier or do i need to use some filters ?

-- 
Thanks and Regards,
Vimal Jain

Re: A question about Scan

Posted by Anoop John <an...@gmail.com>.
Scan s = new Scan();
s.addColum(cf1,cq1)

This will return you rows but each row will contain only this column value
(cf1:cq1)
I guess you want the entire row (all columns)
A query like

select * from table where c1 != null

Correct Vimal?   You will need Filter then.

-Anoop-

On Thu, Mar 20, 2014 at 12:23 PM, Vimal Jain <vk...@gmail.com> wrote:

> Hi RamKrishna,
> Thanks for your reply.
> Actually , It is giving output for some users but i dont have any way to
> verify this against.
>
>
>
> On Thu, Mar 20, 2014 at 12:17 PM, ramkrishna vasudevan <
> ramkrishna.s.vasudevan@gmail.com> wrote:
>
> > Hi Vimal
> >
> > Since you are adding scan.addColumn it should return all the rows that
> has
> > this particular CF and CQ because we explicity track this column.  Do you
> > get anything different?
> >
> > Regards
> > Ram
> >
> >
> > On Thu, Mar 20, 2014 at 11:52 AM, Vimal Jain <vk...@gmail.com> wrote:
> >
> > > Hi,
> > > I want to run a scan on table and get all rows for whom there is a
> value
> > > set in one particular column qualifier.
> > >
> > > I am using something like this ,
> > >
> > > Scan s = new Scan();
> > > s.addColum(cf1,cq1) // cf1:cq1 is the column i am looking for
> > > Then i am iterating over ResultScanner and getting Result objects.
> > >
> > > Will this return me all rows which has a value for that particular
> column
> > > qualifier or do i need to use some filters ?
> > >
> > > --
> > > Thanks and Regards,
> > > Vimal Jain
> > >
> >
>
>
>
> --
> Thanks and Regards,
> Vimal Jain
>

Re: A question about Scan

Posted by Vimal Jain <vk...@gmail.com>.
Hi RamKrishna,
Thanks for your reply.
Actually , It is giving output for some users but i dont have any way to
verify this against.



On Thu, Mar 20, 2014 at 12:17 PM, ramkrishna vasudevan <
ramkrishna.s.vasudevan@gmail.com> wrote:

> Hi Vimal
>
> Since you are adding scan.addColumn it should return all the rows that has
> this particular CF and CQ because we explicity track this column.  Do you
> get anything different?
>
> Regards
> Ram
>
>
> On Thu, Mar 20, 2014 at 11:52 AM, Vimal Jain <vk...@gmail.com> wrote:
>
> > Hi,
> > I want to run a scan on table and get all rows for whom there is a value
> > set in one particular column qualifier.
> >
> > I am using something like this ,
> >
> > Scan s = new Scan();
> > s.addColum(cf1,cq1) // cf1:cq1 is the column i am looking for
> > Then i am iterating over ResultScanner and getting Result objects.
> >
> > Will this return me all rows which has a value for that particular column
> > qualifier or do i need to use some filters ?
> >
> > --
> > Thanks and Regards,
> > Vimal Jain
> >
>



-- 
Thanks and Regards,
Vimal Jain

Re: A question about Scan

Posted by ramkrishna vasudevan <ra...@gmail.com>.
Hi Vimal

Since you are adding scan.addColumn it should return all the rows that has
this particular CF and CQ because we explicity track this column.  Do you
get anything different?

Regards
Ram


On Thu, Mar 20, 2014 at 11:52 AM, Vimal Jain <vk...@gmail.com> wrote:

> Hi,
> I want to run a scan on table and get all rows for whom there is a value
> set in one particular column qualifier.
>
> I am using something like this ,
>
> Scan s = new Scan();
> s.addColum(cf1,cq1) // cf1:cq1 is the column i am looking for
> Then i am iterating over ResultScanner and getting Result objects.
>
> Will this return me all rows which has a value for that particular column
> qualifier or do i need to use some filters ?
>
> --
> Thanks and Regards,
> Vimal Jain
>