Hi, I think you need to recreate "a Filter + attach it to Scan" and make a call to Hbase again in order to get a new set of results or ResultScanner.
You are right, ResultScanner object need to be released quickly when u r done with it at middle tier. Below are the text from HBase book... *10.8.4. Close ResultScanners* *This isn't so much about improving performance but rather avoidingperformance problems. If you forget to close ResultScanners<http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/ResultScanner.html>you can cause problems on the RegionServers. Always have ResultScanner processing enclosed in try/catch blocks... * *Scan scan = new Scan(); // set attrs... ResultScanner rs = htable.getScanner(scan); try { for (Result r = rs.next(); r != null; r = rs.next()) { // process result... } finally { rs.close(); // always close the ResultScanner! } htable.close();* Thanks, On Wed, Apr 18, 2012 at 7:20 PM, Kevin M <[email protected]> wrote: > Hello, > > I am running HBase 0.92.0, and I am wondering if there is a way to scan a > table, cache the ResultScanner, and then continuously filter the > ResultScanner. The use case is to represent the functionality of a faceted > search. The client would select an attribute/facet, a scan would be done > and a ResultScanner would be returned. If the user applied another facet > (forming a breadcrumb trial), then a filter would need to be applied to the > ResultScanner and only those rows that passed the filter would remain. > > I am having trouble thinking about how to do this because I read that the > the ResultScanner instance needs to be released as quickly as possible > because of the amount of remote resources it holds on the server-side, and > I don't see a filter mechanism that provides this type of functionality on > the ResultScanner object. I went through the mailing list but I was unable > to find a post that resembled this idea. > > Thanks. > -- Alok Kumar
