Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 64399200C73 for ; Wed, 10 May 2017 11:47:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61FE7160BB4; Wed, 10 May 2017 09:47:10 +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 A8D15160BA8 for ; Wed, 10 May 2017 11:47:09 +0200 (CEST) Received: (qmail 11404 invoked by uid 500); 10 May 2017 09:47:08 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 11392 invoked by uid 99); 10 May 2017 09:47:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 May 2017 09:47:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4FA61188332 for ; Wed, 10 May 2017 09:47:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Df4S0oAu5jYO for ; Wed, 10 May 2017 09:47:07 +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 4218160E39 for ; Wed, 10 May 2017 09:47:06 +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 95C2FE002A for ; Wed, 10 May 2017 09:47:05 +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 77CA521E1A for ; Wed, 10 May 2017 09:47:04 +0000 (UTC) Date: Wed, 10 May 2017 09:47:04 +0000 (UTC) From: "Ben Watson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HBASE-16356) REST API scanner: row prefix filter and custom filter parameters are mutually exclusive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 10 May 2017 09:47:10 -0000 [ https://issues.apache.org/jira/browse/HBASE-16356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004411#comment-16004411 ] Ben Watson edited comment on HBASE-16356 at 5/10/17 9:46 AM: ------------------------------------------------------------- [~yuzhihong@gmail.com] I've added {{TableResource-HBASE-16356-branch-1.patch}}. was (Author: benwatson528): The patch to be applied to branch-1. > REST API scanner: row prefix filter and custom filter parameters are mutually exclusive > --------------------------------------------------------------------------------------- > > Key: HBASE-16356 > URL: https://issues.apache.org/jira/browse/HBASE-16356 > Project: HBase > Issue Type: Bug > Components: REST > Affects Versions: 1.1.2 > Environment: Not environment specific (tested on HDP 2.4.2) > Reporter: Bjorn Olsen > Assignee: Ben Watson > Priority: Minor > Fix For: 2.0.0, 1.4.0 > > Attachments: TableResource-HBASE-16356-branch-1.patch, TableResource-HBASE-16356.patch > > > A user can optionally specify a row PrefixFilter, or a list of custom filters, to the REST API scanner. > Prefix filter example: > /123*?startrow=0&endrow=9 > Custom filters example: > /*?startrow=0&endrow=9&filter=RowFilter(=,'substring:456) > This works when specified separately, like above. > However, specifying both a prefix filter and a list of custom filters causes the API to ignore the prefix filter. > Example using both parameters: > /123*?startrow=0&endrow=9&filter=RowFilter(=,'substring:456) > It appears that code in the TableResource.getScanResource function is causing this issue as follows: > (see https://hbase.apache.org/devapidocs/src-html/org/apache/hadoop/hbase/rest/TableResource.html#line.196 ) > if (filterList != null) { > tableScan.setFilter(filterList); /*comes from custom filters parameter*/ > } else if (filter != null) { > tableScan.setFilter(filter); > /*comes from row prefix parameter*/ > } > This should probably be changed to use a single filterList for both parameters. The prefix filter can be "Popped" onto the filter list and then these parameters will work even when both are specified. -- This message was sent by Atlassian JIRA (v6.3.15#6346)