Regarding the first question, it has to be used on scanners because the paging is done at the row level, not cell level.
One example usage I can think of, the unit tests: https://github.com/apache/hbase/blob/trunk/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java#L193 Regarding your second question... I'm not sure what exactly the question is. Could you rephrase? Thanks. J-D On Mon, Dec 6, 2010 at 2:17 AM, 梁景明 <[email protected]> wrote: > hi, is there any examples for pagefilter? > here is my app case. > person A and his friends > > id column value > A firend:B B > A firend:C C > A firend:D D > ................ > A firend:Z Z > > and i want to get A's friends from D to G > > as index from 2 to 5 > > 5-2=3 so i think maybe set new PageFilter(3) ,but all results are output > --------------------------------------------------------------- > Get get = new Get("A".getBytes()); > get.addColumn("firend".getBytes()); > get.setFilter(new PageFilter(3)); > table.get(get); > Result r = table.get(get); > List <KeyValue> list=r.list(); > for(KeyValue kv:list){ > System.out.println(Bytes.toString(kv.getValue())); > } > ------------------------------------------------------------ > how to use it ? > > and more question ,some function what i need is some array use case. > > as > previous,next,get(index), data(from x to y) ,size > > is there any new design for array in hbase? > > as desgin > A firend:B B > > i get size from Result.list().size(), but if there is a bigtable ,i double > it done well in memory? > > previous > i scan the record current , mark the previous as result , when get current > break,and get previous one . but it's a bad idea which record is last one. > > next > i scan the record current , when get current, mark the next as result , and > get next one . but it's also a bad idea which record is last one. > > get(index), data(from x to y) > now i have no idea? any suggestion? > > thanks verymuch. >
