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 DEBF4CE6E for ; Tue, 22 May 2012 23:40:42 +0000 (UTC) Received: (qmail 84227 invoked by uid 500); 22 May 2012 23:40:41 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 84081 invoked by uid 500); 22 May 2012 23:40:41 -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 83961 invoked by uid 99); 22 May 2012 23:40:41 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 23:40:41 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0D808142831 for ; Tue, 22 May 2012 23:40:41 +0000 (UTC) Date: Tue, 22 May 2012 23:40:41 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: <1059021396.10020.1337730041056.JavaMail.jiratomcat@issues-vm> In-Reply-To: <761150282.14000.1337349668205.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly 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-6047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281317#comment-13281317 ] Hadoop QA commented on HBASE-6047: ---------------------------------- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12528663/0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 4 new or modified tests. +1 hadoop23. The patch compiles against the hadoop 0.23.x profile. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 33 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: org.apache.hadoop.hbase.replication.TestReplication org.apache.hadoop.hbase.replication.TestMultiSlaveReplication org.apache.hadoop.hbase.replication.TestMasterReplication org.apache.hadoop.hbase.master.TestSplitLogManager Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//console This message is automatically generated. > Put.has() can't determine result correctly > ------------------------------------------ > > Key: HBASE-6047 > URL: https://issues.apache.org/jira/browse/HBASE-6047 > Project: HBase > Issue Type: Bug > Components: client > Affects Versions: 0.92.1 > Reporter: Wang Qiang > Assignee: Alex Newman > Fix For: 0.92.2, 0.96.0, 0.94.1 > > Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java > > > the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block > {code} > else if (ignoreValue) { > for (KeyValue kv: list) { > if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier) > && kv.getTimestamp() == ts) { > return true; > } > } > } > {code} > the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false! > {code} > Put put = new Put(Bytes.toBytes("row-01")); > put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"), > 1234567L, Bytes.toBytes("value-01")); > System.out.println(put.has(Bytes.toBytes("family-01"), > Bytes.toBytes("qualifier-01"))); > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira