From dev-return-1976-archive-asf-public=cust-asf.ponee.io@tephra.incubator.apache.org Mon Jan 22 06:28:07 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id DA2CD180609 for ; Mon, 22 Jan 2018 06:28:07 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C9D43160C37; Mon, 22 Jan 2018 05:28:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1AF15160C36 for ; Mon, 22 Jan 2018 06:28:06 +0100 (CET) Received: (qmail 19780 invoked by uid 500); 22 Jan 2018 05:28:06 -0000 Mailing-List: contact dev-help@tephra.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tephra.incubator.apache.org Delivered-To: mailing list dev@tephra.incubator.apache.org Received: (qmail 19768 invoked by uid 99); 22 Jan 2018 05:28:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2018 05:28:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 9AAFD1A0143 for ; Mon, 22 Jan 2018 05:28:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.711 X-Spam-Level: X-Spam-Status: No, score=-100.711 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XTofNOwAzFyl for ; Mon, 22 Jan 2018 05:28:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 9F54E5F6CD for ; Mon, 22 Jan 2018 05:28:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6A68CE0AFC for ; Mon, 22 Jan 2018 05:28:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A812420DF3 for ; Mon, 22 Jan 2018 05:28:00 +0000 (UTC) Date: Mon, 22 Jan 2018 05:28:00 +0000 (UTC) From: "Anoop Sam John (JIRA)" To: dev@tephra.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEPHRA-274) Handle Filters in preFlush and preCompact hooks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TEPHRA-274?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1633= 3888#comment-16333888 ]=20 Anoop Sam John commented on TEPHRA-274: --------------------------------------- Ya the approach seems right.=C2=A0 So here the extra filter will do some ex= tra filtering other than core HBase filter.=C2=A0 I think the name has to b= e=C2=A0 ExcludeInProgressFilter not IncludeInProgressFilter?=C2=A0 I got confused w= ith the name . On the filter wrapper code {code:java} public boolean next(List result, ScannerContext scannerContext) thro= ws IOException { List outResult =3D new ArrayList(); while (true) { boolean next =3D delegate.next(outResult, scannerContext); if (!next) { return next; } for (Cell cell : outResult) { ReturnCode code =3D 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 boole= an was false. =20 > 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.m= anual_diff > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)