Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F49818C8C for ; Thu, 11 Feb 2016 21:45:35 +0000 (UTC) Received: (qmail 8217 invoked by uid 500); 11 Feb 2016 21:45:30 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 8148 invoked by uid 500); 11 Feb 2016 21:45:30 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 7309 invoked by uid 99); 11 Feb 2016 21:45:29 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2016 21:45:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 31BCBC0873 for ; Thu, 11 Feb 2016 21:45:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 6Nj5SbP9G8al for ; Thu, 11 Feb 2016 21:45:27 +0000 (UTC) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id B19E743F64 for ; Thu, 11 Feb 2016 21:45:27 +0000 (UTC) Received: by mail-yw0-f175.google.com with SMTP id g127so50434351ywf.2 for ; Thu, 11 Feb 2016 13:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=E9k7QkYTG3+vgjwoQ/DjaNklFaiQFPJ5slu+fpwBf4s=; b=sq8c9U4Lg7rnqmWC3ExJ91VEN+lJv6lfPZFc2KevuE5zlIlNPD3O1crBzKQqJSi+yg kt9a/eCjoL1rPu0Y3DV3ljOBvI6/1lZY8KT2kP9UtnFrBD6X05/gjVAHXjrEQMcGJ5ta tj4BSmOMSIjL5o1GnCZzUn3rCcZ+9HkCRptqnRjMvvYEoUXW7AdIckuZXt4S3Rn2llm/ jAA4jexfCW9ZZjJLcuwTaYa5zyUU/IsKeER/9vb6uADC7+KRVnyS10/Y2Rkp232d3YoT QtMKtl2FNY2dG44iNUQIXG/200wtla2tvYVgbA5Gw4UKVhXmQuoCVKQGM3/y3wNndnWB nN9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=E9k7QkYTG3+vgjwoQ/DjaNklFaiQFPJ5slu+fpwBf4s=; b=Yvugqj9j2ICngNFHUn7i2gy7caQiIxhFnn8IKNcgQdBtFWccGMuiQdWKwWFGtQWeHE AGOD5YhsDCBJ+xOg6n8EsyLiPTIlmakA+1pTjcIvZwrgzJekl7jdvxUAyLMRxRfs8nU5 VxqO9FC96+8L+prAuWx0XaamY36zkxgwO2EPPMHCHaAj+w+7uOkqStazJNPJHPIkvZD8 55RTdkxx0t+q84IPA5f2UR+YM0Po1AJWzwlRVfhnJDlPvKKgumBBMywN6LL+3J0h1BHD CEDbMIwalIcZp3Qaauw2mCMy7c3mfqKpSTSsHJorIfZmYanCbT46/6/CK8j+6wQH/Ic0 UKTg== X-Gm-Message-State: AG10YOQ935niXuPTPnOpuXfwGCSybHQh/mvaW1IbH/w7pAkahWj9kLNQgOjy5MxOJAkDYMPP/IdwDnNlgyaDVA== MIME-Version: 1.0 X-Received: by 10.129.45.2 with SMTP id t2mr25382987ywt.182.1455227127449; Thu, 11 Feb 2016 13:45:27 -0800 (PST) Received: by 10.37.223.82 with HTTP; Thu, 11 Feb 2016 13:45:27 -0800 (PST) In-Reply-To: References: Date: Thu, 11 Feb 2016 13:45:27 -0800 Message-ID: Subject: Re: hbase filter based on dynamic column qualifier's value From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a11428d3effe9f5052b85770b --001a11428d3effe9f5052b85770b Content-Type: text/plain; charset=UTF-8 Please take a look at filterKeyValue(Cell) method of SingleColumnValueFilter : if (!CellUtil.matchingColumn(c, this.columnFamily, this.columnQualifier)) { When you write your own Filter supporting multiple columns, rewrite the above check to fit your needs. Cheers On Thu, Feb 11, 2016 at 4:41 AM, Mukesh Jha wrote: > Hi > > I'm storing an array of attributes having attributes+index as qualifier > name, my column family name is 'cf' here. > > Each row in my HBase table that looks like below. > > cf:attribute1 -> 'value apple' > cf:attribute2 -> 'value banana' > cf:attribute{N} -> 'value iphone' > cf:someId1 -> 1111 > cf:someOtherQualifier -> 'value e' > > > While reading data our of HBase I want to scan my table and use an > *ValueFilter > *on the cf:attribute* columns for a value (say "apple"). > > On a match I want the entirerows to be returned. > > Below are possible solutions for me > > - Add multiple SingleColumnValue filters for each attribute*. But I > donot know the no. of items that will be present in attribute* also the > list might go till 100 so will it affect the scan performance? > - Store the attributes arraylist as ArrayWritable [1], I'm now sure how > the scan filter's will work here. If any of you have any experience > please > help. > - Implement my own filter and ship it in all my RS. > > *[1]:* > > http://grepcode.com/file/repo1.maven.org/maven2/com.ning/metrics.action/0.2.0/org/apache/hadoop/io/ArrayWritable.java > > -- > Thanks & Regards, > > *Mukesh Jha * > --001a11428d3effe9f5052b85770b--