[
https://issues.apache.org/jira/browse/TEPHRA-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16333888#comment-16333888
]
Anoop Sam John commented on TEPHRA-274:
---------------------------------------
Ya the approach seems right. So here the extra filter will do some extra
filtering other than core HBase filter. I think the name has to be
ExcludeInProgressFilter not IncludeInProgressFilter? I got confused with the
name .
On the filter wrapper code
{code:java}
public boolean next(List<Cell> result, ScannerContext scannerContext) throws
IOException {
List<Cell> outResult = new ArrayList<Cell>();
while (true) {
boolean next = delegate.next(outResult, scannerContext);
if (!next) {
return next;
}
for (Cell cell : outResult) {
ReturnCode code = filter.filterKeyValue(cell);
switch (code) {
// included, so we are done
case INCLUDE:
case INCLUDE_AND_NEXT_COL:
result.add(cell);
break;
case SKIP:
case NEXT_COL:
case NEXT_ROW:
default:
break;
}
}
if (!result.isEmpty()) {
return true;
}
}
}{code}
if (!next) check to be done after the for loop I believe. Or else u will not
process the outResult got in 1st call to next() and the more rows boolean was
false.
> Handle Filters in preFlush and preCompact hooks
> -----------------------------------------------
>
> Key: TEPHRA-274
> URL: https://issues.apache.org/jira/browse/TEPHRA-274
> Project: Tephra
> Issue Type: Sub-task
> Reporter: Ankit Singhal
> Assignee: Ankit Singhal
> Priority: Major
> Labels: HBase-2.0
> Fix For: 0.14.0-incubating
>
> Attachments: FilteredInternalScanner.java,
> TransactionProcessor.manual_diff
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)