|
Mohammad Tariq
2012-12-04, 13:30
ramkrishna vasudevan
2012-12-04, 14:32
Mohammad Tariq
2012-12-04, 14:36
anil gupta
2012-12-04, 17:31
Mohammad Tariq
2012-12-04, 19:21
lars hofhansl
2012-12-05, 07:16
Anil Gupta
2012-12-05, 07:26
Mohammad Tariq
2012-12-05, 09:06
|
-
PrefixFilter : not working for 'long' keysMohammad Tariq 2012-12-04, 13:30
Hello list,
I am trying to use PrefixFilter on my table, whose rowkeys are of type 'long'. But I am getting all the rows in the result. And if use the same code on rowkeys of type 'String' it is working perfectly fine. Need some help. Many thanks. Regards, Mohammad Tariq
-
Re: PrefixFilter : not working for 'long' keysramkrishna vasudevan 2012-12-04, 14:32
Ok, what i think can be done is try writing a custom filter like
PreFixFilter and use a Comparator that compares long. In case of SCVF it has a comparator passed to it. So we can implement a comparator that compares long and pass it to the constructor of SCVF. Hope this helps. Regards Ram On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > Hello list, > > I am trying to use PrefixFilter on my table, whose rowkeys are of type > 'long'. But I am getting all the rows in the result. And if use the same > code on rowkeys of type 'String' it is working perfectly fine. Need some > help. > > Many thanks. > > Regards, > Mohammad Tariq >
-
Re: PrefixFilter : not working for 'long' keysMohammad Tariq 2012-12-04, 14:36
Thank you for the quick response sir. I was thinking about the same thing,
but just wanted to ask on the list once before moving forward. I'll try it out. Regards, Mohammad Tariq On Tue, Dec 4, 2012 at 8:02 PM, ramkrishna vasudevan < [EMAIL PROTECTED]> wrote: > Ok, what i think can be done is try writing a custom filter like > PreFixFilter and use a Comparator that compares long. > > In case of SCVF it has a comparator passed to it. So we can implement a > comparator that compares long and pass it to the constructor of SCVF. > > Hope this helps. > > Regards > Ram > > On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > > > Hello list, > > > > I am trying to use PrefixFilter on my table, whose rowkeys are of > type > > 'long'. But I am getting all the rows in the result. And if use the same > > code on rowkeys of type 'String' it is working perfectly fine. Need some > > help. > > > > Many thanks. > > > > Regards, > > Mohammad Tariq > > >
-
Re: PrefixFilter : not working for 'long' keysanil gupta 2012-12-04, 17:31
Hi Mohammad,
Suppose your rowkey is 345346654. Are you trying to match this row on the basis of prefix 3453? If yes, then the default PrefixFilter wont work. I am a little skeptic that prefix like this will work because AFAIK byte[] of 3453 is not guaranteed to be a prefix of byte[] of 345346654. I have played with a rowkey which is a sequence of long and short. In my case it works as long as i am matching the entire variable(long,short,byte) in Prefix Filter. HTH, Anil Gupta On Tue, Dec 4, 2012 at 6:36 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > Thank you for the quick response sir. I was thinking about the same thing, > but just wanted to ask on the list once before moving forward. I'll try it > out. > > Regards, > Mohammad Tariq > > > > On Tue, Dec 4, 2012 at 8:02 PM, ramkrishna vasudevan < > [EMAIL PROTECTED]> wrote: > > > Ok, what i think can be done is try writing a custom filter like > > PreFixFilter and use a Comparator that compares long. > > > > In case of SCVF it has a comparator passed to it. So we can implement a > > comparator that compares long and pass it to the constructor of SCVF. > > > > Hope this helps. > > > > Regards > > Ram > > > > On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> > wrote: > > > > > Hello list, > > > > > > I am trying to use PrefixFilter on my table, whose rowkeys are of > > type > > > 'long'. But I am getting all the rows in the result. And if use the > same > > > code on rowkeys of type 'String' it is working perfectly fine. Need > some > > > help. > > > > > > Many thanks. > > > > > > Regards, > > > Mohammad Tariq > > > > > > -- Thanks & Regards, Anil Gupta
-
Re: PrefixFilter : not working for 'long' keysMohammad Tariq 2012-12-04, 19:21
Hello Anil,
I see. Your logic sounds appealing. I need to take a few test cases and test it properly. Thank you for the valuable respone. Regards, Mohammad Tariq On Tue, Dec 4, 2012 at 11:01 PM, anil gupta <[EMAIL PROTECTED]> wrote: > Hi Mohammad, > > Suppose your rowkey is 345346654. Are you trying to match this row on the > basis of prefix 3453? > If yes, then the default PrefixFilter wont work. I am a little skeptic that > prefix like this will work because AFAIK byte[] of 3453 is not guaranteed > to be a prefix of byte[] of 345346654. > I have played with a rowkey which is a sequence of long and short. In my > case it works as long as i am matching the entire variable(long,short,byte) > in Prefix Filter. > > HTH, > Anil Gupta > > On Tue, Dec 4, 2012 at 6:36 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > > > Thank you for the quick response sir. I was thinking about the same > thing, > > but just wanted to ask on the list once before moving forward. I'll try > it > > out. > > > > Regards, > > Mohammad Tariq > > > > > > > > On Tue, Dec 4, 2012 at 8:02 PM, ramkrishna vasudevan < > > [EMAIL PROTECTED]> wrote: > > > > > Ok, what i think can be done is try writing a custom filter like > > > PreFixFilter and use a Comparator that compares long. > > > > > > In case of SCVF it has a comparator passed to it. So we can implement > a > > > comparator that compares long and pass it to the constructor of SCVF. > > > > > > Hope this helps. > > > > > > Regards > > > Ram > > > > > > On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> > > wrote: > > > > > > > Hello list, > > > > > > > > I am trying to use PrefixFilter on my table, whose rowkeys are of > > > type > > > > 'long'. But I am getting all the rows in the result. And if use the > > same > > > > code on rowkeys of type 'String' it is working perfectly fine. Need > > some > > > > help. > > > > > > > > Many thanks. > > > > > > > > Regards, > > > > Mohammad Tariq > > > > > > > > > > > > > -- > Thanks & Regards, > Anil Gupta >
-
Re: PrefixFilter : not working for 'long' keyslars hofhansl 2012-12-05, 07:16
I assume you are creating your PrefixFilter with something like:
new PrefixFilter(Bytes.toBytes(val)); In your case are you maybe passing a literal like so: new PrefixFilter(Bytes.toBytes(42)); ? If that case toBytes will encode an int. You have to do: new PrefixFilter(Bytes.toBytes(42L)); Just a guess, not knowing what your problem actually is... -- Lars ________________________________ From: Mohammad Tariq <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Tuesday, December 4, 2012 5:30 AM Subject: PrefixFilter : not working for 'long' keys Hello list, I am trying to use PrefixFilter on my table, whose rowkeys are of type 'long'. But I am getting all the rows in the result. And if use the same code on rowkeys of type 'String' it is working perfectly fine. Need some help. Many thanks. Regards, Mohammad Tariq
-
Re: PrefixFilter : not working for 'long' keysAnil Gupta 2012-12-05, 07:26
Hi Mohammad,
Let me know the outcome of your experiments. Best Regards, Anil On Dec 4, 2012, at 11:21 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > Hello Anil, > > I see. Your logic sounds appealing. I need to take a few test cases > and test it properly. Thank you for the valuable respone. > > Regards, > Mohammad Tariq > > > > On Tue, Dec 4, 2012 at 11:01 PM, anil gupta <[EMAIL PROTECTED]> wrote: > >> Hi Mohammad, >> >> Suppose your rowkey is 345346654. Are you trying to match this row on the >> basis of prefix 3453? >> If yes, then the default PrefixFilter wont work. I am a little skeptic that >> prefix like this will work because AFAIK byte[] of 3453 is not guaranteed >> to be a prefix of byte[] of 345346654. >> I have played with a rowkey which is a sequence of long and short. In my >> case it works as long as i am matching the entire variable(long,short,byte) >> in Prefix Filter. >> >> HTH, >> Anil Gupta >> >> On Tue, Dec 4, 2012 at 6:36 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: >> >>> Thank you for the quick response sir. I was thinking about the same >> thing, >>> but just wanted to ask on the list once before moving forward. I'll try >> it >>> out. >>> >>> Regards, >>> Mohammad Tariq >>> >>> >>> >>> On Tue, Dec 4, 2012 at 8:02 PM, ramkrishna vasudevan < >>> [EMAIL PROTECTED]> wrote: >>> >>>> Ok, what i think can be done is try writing a custom filter like >>>> PreFixFilter and use a Comparator that compares long. >>>> >>>> In case of SCVF it has a comparator passed to it. So we can implement >> a >>>> comparator that compares long and pass it to the constructor of SCVF. >>>> >>>> Hope this helps. >>>> >>>> Regards >>>> Ram >>>> >>>> On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> >>> wrote: >>>> >>>>> Hello list, >>>>> >>>>> I am trying to use PrefixFilter on my table, whose rowkeys are of >>>> type >>>>> 'long'. But I am getting all the rows in the result. And if use the >>> same >>>>> code on rowkeys of type 'String' it is working perfectly fine. Need >>> some >>>>> help. >>>>> >>>>> Many thanks. >>>>> >>>>> Regards, >>>>> Mohammad Tariq >>>>> >>>> >>> >> >> >> >> -- >> Thanks & Regards, >> Anil Gupta >>
-
Re: PrefixFilter : not working for 'long' keysMohammad Tariq 2012-12-05, 09:06
Hello Lars,
Same thing is happening with 'L' as well. Anil : Sure. Regards, Mohammad Tariq On Wed, Dec 5, 2012 at 12:56 PM, Anil Gupta <[EMAIL PROTECTED]> wrote: > Hi Mohammad, > Let me know the outcome of your experiments. > > Best Regards, > Anil > > On Dec 4, 2012, at 11:21 AM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > > > Hello Anil, > > > > I see. Your logic sounds appealing. I need to take a few test cases > > and test it properly. Thank you for the valuable respone. > > > > Regards, > > Mohammad Tariq > > > > > > > > On Tue, Dec 4, 2012 at 11:01 PM, anil gupta <[EMAIL PROTECTED]> > wrote: > > > >> Hi Mohammad, > >> > >> Suppose your rowkey is 345346654. Are you trying to match this row on > the > >> basis of prefix 3453? > >> If yes, then the default PrefixFilter wont work. I am a little skeptic > that > >> prefix like this will work because AFAIK byte[] of 3453 is not > guaranteed > >> to be a prefix of byte[] of 345346654. > >> I have played with a rowkey which is a sequence of long and short. In my > >> case it works as long as i am matching the entire > variable(long,short,byte) > >> in Prefix Filter. > >> > >> HTH, > >> Anil Gupta > >> > >> On Tue, Dec 4, 2012 at 6:36 AM, Mohammad Tariq <[EMAIL PROTECTED]> > wrote: > >> > >>> Thank you for the quick response sir. I was thinking about the same > >> thing, > >>> but just wanted to ask on the list once before moving forward. I'll try > >> it > >>> out. > >>> > >>> Regards, > >>> Mohammad Tariq > >>> > >>> > >>> > >>> On Tue, Dec 4, 2012 at 8:02 PM, ramkrishna vasudevan < > >>> [EMAIL PROTECTED]> wrote: > >>> > >>>> Ok, what i think can be done is try writing a custom filter like > >>>> PreFixFilter and use a Comparator that compares long. > >>>> > >>>> In case of SCVF it has a comparator passed to it. So we can implement > >> a > >>>> comparator that compares long and pass it to the constructor of SCVF. > >>>> > >>>> Hope this helps. > >>>> > >>>> Regards > >>>> Ram > >>>> > >>>> On Tue, Dec 4, 2012 at 7:00 PM, Mohammad Tariq <[EMAIL PROTECTED]> > >>> wrote: > >>>> > >>>>> Hello list, > >>>>> > >>>>> I am trying to use PrefixFilter on my table, whose rowkeys are of > >>>> type > >>>>> 'long'. But I am getting all the rows in the result. And if use the > >>> same > >>>>> code on rowkeys of type 'String' it is working perfectly fine. Need > >>> some > >>>>> help. > >>>>> > >>>>> Many thanks. > >>>>> > >>>>> Regards, > >>>>> Mohammad Tariq > >>>>> > >>>> > >>> > >> > >> > >> > >> -- > >> Thanks & Regards, > >> Anil Gupta > >> > |