Hello,
I got a self-defined Filter like this:
class FilterA{
*private int count*;
...
}
and used as:
Scan scan = new Scan(...);
> scan.addFilter(new FilterA());
> ...
> *while(someCondition){
> * ResultScanner scanner = htable.getScanner(scan);
> .....
> *}*
*
*
the value of "count" in FilterA would *changed* var loop in the WHILE. It
works on HBase 0.90x, but when we upate to HBase0.92rc4, it turns out
that *FilterA
lost it's "count" value* during while loop.
I try throw a Excpetion in FilterA's construct method and find "public
FilterA()" would called every time when getScanner called. So during the
loop filter get a new instance each time.
The Question is, how can i *keep a private variable's value in Filter
between two calls of getScanner(scan)*? or why should not to do like this?
Thanks~