tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-274) Handle Filters in preFlush and preCompact hooks
Date Mon, 22 Jan 2018 05:28:00 GMT

    [ 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

 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:
                case SKIP:
                case NEXT_COL:
                case NEXT_ROW:
            if (!result.isEmpty()) {
                return true;
 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

View raw message