Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FC15D7EE for ; Wed, 12 Dec 2012 08:33:23 +0000 (UTC) Received: (qmail 23133 invoked by uid 500); 12 Dec 2012 08:33:23 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 23100 invoked by uid 500); 12 Dec 2012 08:33:22 -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 23051 invoked by uid 99); 12 Dec 2012 08:33:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2012 08:33:22 +0000 Date: Wed, 12 Dec 2012 08:33:22 +0000 (UTC) From: "ramkrishna.s.vasudevan (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7337) SingleColumnValueFilter seems to get unavailble data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13529746#comment-13529746 ] ramkrishna.s.vasudevan commented on HBASE-7337: ----------------------------------------------- Did you check with your values? Like the inserted values are also String and the one that you are querying is also String? Just to verify... > SingleColumnValueFilter seems to get unavailble data > ---------------------------------------------------- > > Key: HBASE-7337 > URL: https://issues.apache.org/jira/browse/HBASE-7337 > Project: HBase > Issue Type: Bug > Components: Filters > Affects Versions: 0.94.3, 0.96.0 > Environment: 0.94 > Reporter: Zhou wenjian > Assignee: Zhou wenjian > Fix For: 0.96.0, 0.94.4 > > > put multi versions of a row. > r1 cf:q version:1 value:1 > r1 cf:q version:2 value:3 > r1 cf:q version:3 value:2 > the filter in scan is set as below: > SingleColumnValueFilter valueF = new SingleColumnValueFilter( > family,qualifier,CompareOp.EQUAL,new BinaryComparator(Bytes > .toBytes("2"))); > then i found all of the three versions will be emmitted, then i set latestVersionOnly to false, the result does no change. > public ReturnCode filterKeyValue(KeyValue keyValue) { > // System.out.println("REMOVE KEY=" + keyValue.toString() + ", value=" + Bytes.toString(keyValue.getValue())); > if (this.matchedColumn) { > // We already found and matched the single column, all keys now pass > return ReturnCode.INCLUDE; > } else if (this.latestVersionOnly && this.foundColumn) { > // We found but did not match the single column, skip to next row > return ReturnCode.NEXT_ROW; > } > if (!keyValue.matchingColumn(this.columnFamily, this.columnQualifier)) { > return ReturnCode.INCLUDE; > } > foundColumn = true; > if (filterColumnValue(keyValue.getBuffer(), > keyValue.getValueOffset(), keyValue.getValueLength())) { > return this.latestVersionOnly? ReturnCode.NEXT_ROW: ReturnCode.INCLUDE; > } > this.matchedColumn = true; > return ReturnCode.INCLUDE; > } > From the code above, it seeems that version 3 will be first emmited, and set matchedColumn to false, which leads the following version 2 and 1 emmited too. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira