Edward, Thank you for your help.
Jeff Zhang On Wed, Dec 9, 2009 at 7:44 AM, Edward Capriolo <[email protected]>wrote: > On Wed, Dec 9, 2009 at 9:45 AM, Jeff Zhang <[email protected]> wrote: > > Peter, > > > > Your method will scan one column family, but I just want to only scan the > > row keys. Is it possible ? > > > > > > Jeff Zhang > > > > > > On Wed, Dec 9, 2009 at 6:42 AM, Peter Rietzler < > > [email protected]> wrote: > > > >> > >> Sorry - I misunderstood your question. I thought that you wanted to > fetch > >> only one column. > >> We fetch a reference column for our scans (which is very small): > >> > >> Scan scan = new Scan(); > >> scan.addColumn("family".getBytes(), "column".getBytes()); > >> table.getScanner(scan); > >> > >> Peter > >> > >> > >> Jeff Zhang-4 wrote: > >> > > >> > Peter, > >> > > >> > the api docs shows that there's no way to only get row key. So I'd > like > >> to > >> > know is it make sense to provide such a API > >> > > >> > > >> > Jeff Zhang > >> > > >> > > >> > On Wed, Dec 9, 2009 at 1:48 PM, Peter Rietzler < > >> > [email protected]> wrote: > >> > > >> >> > >> >> > >> >> Just have a Look at the Api Docs: > >> >> > >> >> > >> > http://hadoop.apache.org/hbase/docs/current/api/org/apache/hadoop/hbase/client/Scan.html > >> >> > >> >> > >> >> Jeff Zhang-4 wrote: > >> >> > > >> >> > HI all, > >> >> > > >> >> > I create a new ResultScanner like this ; > >> >> > ResultScanner scanner=table.getScanner(new Scan()); > >> >> > So the default scan will scan all the families. But now I just want > to > >> >> > only > >> >> > retrieval the row keys, so is there any API for this purpose ? > >> >> > > >> >> > > >> >> > Thank you > >> >> > > >> >> > > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://old.nabble.com/How-can-I-just-scan-the-row-key---tp26689858p26705497.html > >> >> Sent from the HBase User mailing list archive at Nabble.com. > >> >> > >> >> > >> > > >> > > >> > >> -- > >> View this message in context: > >> > http://old.nabble.com/How-can-I-just-scan-the-row-key---tp26689858p26711310.html > >> Sent from the HBase User mailing list archive at Nabble.com. > >> > >> > > > > I pretty much just asked the same question. > > Stack told me... > > stack > to hbase-user > > show details 11:43 PM (10 hours ago) > > Try using this filter instead: > > scan.setFilter(FirstKeyOnlyFilter.new()) > > Will only return row keys, if thats the effect you are looking for. > > St.Ack >
