[ https://issues.apache.org/jira/browse/HBASE-6429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421107#comment-13421107 ]
Jie Huang commented on HBASE-6429: ---------------------------------- I am afraid we cannot do that. See the following case : {code} // pseudocode void filterRow(List<KeyValue> kvs){ if kvs.contains(target_kv) { kvs.remove(target_kv) find_target_kv_count++ } } // According to the javadoc, it is the Last chance to veto row based on previous filterKeyValue(KeyValue) calls. boolean filterRow() { return true; // kvs is empty finally } Case A void filterRowWrapper(List<KeyValue> kvs) { this.filter.filterRow(kvs) // find_target_kv_count++ has been called here if ( !kvs.isEmpty() && this.filter.filterRow() ) { kvs.clear(); // kvs is empty here } // find_target_kv_count has been changed } Case B void filterRowWrapper(List<KeyValue> kvs) { if ( !kvs.isEmpty() && this.filter.filterRow() ) { kvs.clear(); // kvs is empty here } if( !this.filter.filterRow() ) { this.filter.filterRow(kvs); } // find_target_kv_count hasn't been changed } {code} Any question , please let me know. > Filter with filterRow() returning true is incompatible with scan with limit > --------------------------------------------------------------------------- > > Key: HBASE-6429 > URL: https://issues.apache.org/jira/browse/HBASE-6429 > Project: HBase > Issue Type: Bug > Components: filters > Affects Versions: 0.96.0 > Reporter: Jason Dai > Attachments: hbase-6429-trunk.patch, hbase-6429_0_94_0.patch > > > Currently if we scan with bot limit and a Filter with > filterRow(List<KeyValue>) implemented, an IncompatibleFilterException will > be thrown. The same exception should also be thrown if the filer has its > filterRow() implemented. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira