Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BA87610435 for ; Wed, 27 Nov 2013 12:30:28 +0000 (UTC) Received: (qmail 14194 invoked by uid 500); 27 Nov 2013 12:30:20 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 13550 invoked by uid 500); 27 Nov 2013 12:30:13 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 13523 invoked by uid 99); 27 Nov 2013 12:30:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Nov 2013 12:30:10 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=ASF_LIST_OPS,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of samir.helpdoc@gmail.com designates 209.85.128.182 as permitted sender) Received: from [209.85.128.182] (HELO mail-ve0-f182.google.com) (209.85.128.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Nov 2013 12:30:04 +0000 Received: by mail-ve0-f182.google.com with SMTP id jy13so4953227veb.41 for ; Wed, 27 Nov 2013 04:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=L57udW0/qd/QgMf6OZAEG7sqZ0MUwvVv9xG3we3JVHA=; b=k3FJbguOM3rq+CZRYFbu5ga8FfqyiD4Sjk4WwqGMaxYtqDxNxDfz8CTKQUQ1oFhNuO 0p70oL3/SjL/sy4VXZLpy6j1batHh4aBzH8wsz4JjhzDeRis9XAFC8b+zHWwp/KTid3M J04Ay6kpR1NGg0HWm8AG6W7FEhNNEcZHbeFFI8y9Vx9tCaAIHicMqJDweCxfMLp4VeZe eNVp0CEpmuuE3216KTwqqQ1fQPZydUECrqRXzPBm48A7U+ZPEs/yDg9clz+huIbF4vD6 QhdjkNXml9t7pTTMT153urMwLsuPHow3uhZ4oD+2/0jgSza7iOX9gRaGNFIZSBikmk+J bFrA== MIME-Version: 1.0 X-Received: by 10.58.255.71 with SMTP id ao7mr34380823ved.16.1385555383382; Wed, 27 Nov 2013 04:29:43 -0800 (PST) Received: by 10.58.47.35 with HTTP; Wed, 27 Nov 2013 04:29:43 -0800 (PST) Date: Wed, 27 Nov 2013 17:59:43 +0530 Message-ID: Subject: Region Server based filter using SingleColumnValueFilter is not working in CDH4.2.1 but working on CDH4.1.2 From: samir das mohapatra To: cdh-user@cloudera.com, cdh-user@cloudera.org, user@hadoop.apache.org, user-help@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7bf0d1b471a3be04ec27c0dc X-Virus-Checked: Checked by ClamAV on apache.org --047d7bf0d1b471a3be04ec27c0dc Content-Type: text/plain; charset=ISO-8859-1 Dear Hadoop/Hbase Developer, I was trying to scan the hbase table by applying *SingleColumnValueFilter ,* It workes fine in CDH4.1.2 but when same code I am running in Other Dev cluster which is not working under CDH4.2.1 , Is there any issue with version difference or it is a code level issue ? I am sharing the code which i wrote in Driver level scanning for hbase mapreduce. CODE ***************** List filters = new ArrayList(); SingleColumnValueFilter colValFilter = new SingleColumnValueFilter(Bytes.toBytes("cf1"), Bytes.toBytes("code"), CompareFilter.CompareOp.EQUAL, new SubstringComparator("SAMIR_AL_START ")); colValFilter.setFilterIfMissing(false); filters.add(colValFilter); FilterList fl = new FilterList( FilterList.Operator.MUST_PASS_ALL, filters); Scan scan = new Scan(); scan.setFilter(fl); scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("sequence_id")); scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("session_id")); scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("timestamp")); scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("userguid")); scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("code")); **************************************************************************************** *Note: same code when I am running, it is not giving only "SAMIR_AL_START " value as output , rather then it is producing the other family's some Other value. * *For example I want to filter the record from hbase which containes only "SAMIR_AL_START" as value under families 'cf1' and qualifier 'code' (It is giving as i wanted under CDH4.1.2 but when I am running same code in Other cluder(CDH4.2.1) * *which is not giving the right output )* *If Incase anyone already aware with this type of filter in hbase using java could you please help me on the same problem.* *Thanks,* *samir. * --047d7bf0d1b471a3be04ec27c0dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Dear Hadoop/Hbase Developer,

=A0 I was = trying to scan the hbase table =A0by =A0applying =A0SingleColumnValueFil= ter =A0, It workes fine in CDH4.1.2 =A0but when same code =A0I am runni= ng in Other Dev cluster which is not working under CDH4.2.1 , Is there any = issue with version difference or it is a code level issue ?
=A0
=A0 I am sharing the code which i wrote in Driver = level scanning for hbase mapreduce.

CODE
=
*****************

=A0List<Filter> = filters =3D new ArrayList<Filter>();

=A0 =A0SingleColumnValueFilter colValFilter =3D new Sin= gleColumnValueFilter(Bytes.toBytes("cf1"), Bytes.toBytes("co= de"), CompareFilter.CompareOp.EQUAL, new SubstringComparator("SAM= IR_AL_START=A0"));


=A0 =A0 colValFilter.setFilterIfMissing(= false);
=A0 =A0 filters.add(colValFilter);=A0
=A0 =A0= =A0
=A0 =A0
=A0 =A0 FilterList fl =3D new FilterLis= t( FilterList.Operator.MUST_PASS_ALL, filters);


=A0 =A0 Scan scan =3D new Scan();
<= div>=A0 =A0 scan.setFilter(fl);
=A0 =A0 scan.addColumn(Bytes.toBy= tes("cf1"), Bytes.toBytes("sequence_id"));
= =A0 =A0 scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("= session_id"));
=A0 =A0 scan.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes(&= quot;timestamp"));
=A0 =A0 scan.addColumn(Bytes.toBytes(&quo= t;cf1"), Bytes.toBytes("userguid"));
=A0 =A0 scan.= addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("code"));=

*************************************************= ***************************************

Note: same code when I am running, it is not giving =A0onl= y =A0"SAMIR_AL_START=A0" value as output , rather then it is prod= ucing the other family's some Other value.=A0

For example I want to filter the record =A0fr= om hbase which containes only "SAMIR_AL_START"=A0=A0as value unde= r families 'cf1' and qualifier=A0'code' (It is giving as i = wanted under CDH4.1.2 but when I am running same code in Other cluder(CDH4.= 2.1)=A0
which is not giving =A0the right output )

=


If Incase any= one already =A0aware with this type of filter in hbase using java could you= please help me on the same problem.



<= br>

Thanks,
samir.= =A0


--047d7bf0d1b471a3be04ec27c0dc--