hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuti Awasthi <stutiawas...@hcl.com>
Subject RE: Java api to apply limit in scan
Date Mon, 23 Jan 2012 06:15:37 GMT
Ok Doug,
Thanks for pointing. 2 row selection is just the example I use but yes I will keep this in

-----Original Message-----
From: Doug Meil [mailto:doug.meil@explorysmedical.com] 
Sent: Friday, January 20, 2012 7:01 PM
To: user@hbase.apache.org
Subject: Re: Java api to apply limit in scan

Also, if you know you only want 2 rows, for example, make sure the caching is set to 2 so
that it only reads that many on the RegionServer.

On 1/20/12 12:31 AM, "Harsh J" <harsh@cloudera.com> wrote:

>Hi Stuti,
>The way the Shell does it is by iterating over the ResultScanner 
>iterator for only LIMIT number of times alone and then exiting out. 
>There is no API that specifies a LIMIT clause of sorts, its to be self-built by you.
>On 20-Jan-2012, at 10:53 AM, Stuti Awasthi wrote:
>> Hi ,
>> I am looking into how to limit the output of scans. I got this in 
>>shell but not able to get any java api for that. I am sure I am missing it.
>> scan 't1',{LIMIT=>2}
>> Please suggest me the scan api for limit the output of scan.
>> Thanks
>> Regards,
>> Stuti Awasthi
>> HCL Comnet Systems and Services Ltd
>> F-8/9 Basement, Sec-3,Noida.
>> ________________________________
>> The contents of this e-mail and any attachment(s) are confidential 
>>and intended for the named recipient(s) only.
>> It shall not attach any liability on the originator or HCL or its 
>>affiliates. Any views or opinions presented in  this email are solely 
>>those of the author and may not necessarily reflect the opinions of 
>>HCL or its affiliates.
>> Any form of reproduction, dissemination, copying, disclosure, 
>>modification, distribution and / or publication of  this message 
>>without the prior written consent of the author of this e-mail is 
>>strictly prohibited. If you have  received this email in error please 
>>delete it and notify the sender immediately. Before opening any mail 
>>and  attachments please check them for viruses and defect.
>Harsh J
>Customer Ops. Engineer, Cloudera

View raw message