Thanks. So I will add this... scan.setFilter(new FirstKeyOnlyFilter());
But after I do this... Result result = scanner.next(); There's no... result.getKey() - so what method would give me the Key value? On Wed, Feb 2, 2011 at 10:20 PM, Stack <st...@duboce.net> wrote: > See > http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/FirstKeyOnlyFilter.html > St.Ack > > On Thu, Feb 3, 2011 at 6:01 AM, Something Something > <mailinglist...@gmail.com> wrote: > > I want to read only the keys in a table. I tried this... > > > > try { > > > > HTable table = new HTable("myTable"); > > > > Scan scan = new Scan(); > > > > scan.addFamily(Bytes.toBytes("Info")); > > > > ResultScanner scanner = table.getScanner(scan); > > > > Result result = scanner.next(); > > > > while (result != null) { > > > > & so on... > > > > This was performing fairly well until I added another Family that > contains > > lots of key/value pairs. My understanding was that adding another family > > wouldn't affect performance of this code because I am explicitly using > > "Info", but it is. > > > > Anyway, in this particular use case, I only care about the "Key" of the > row. > > I don't need any values from any of the families. What's the best way > to > > do this? > > > > Please let me know. Thanks. > > >