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 1CB73200B78 for ; Fri, 2 Sep 2016 20:50:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1B327160ACC; Fri, 2 Sep 2016 18:50:22 +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 8FCF0160A8C for ; Fri, 2 Sep 2016 20:50:21 +0200 (CEST) Received: (qmail 19112 invoked by uid 500); 2 Sep 2016 18:50:20 -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 19095 invoked by uid 99); 2 Sep 2016 18:50:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2016 18:50:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 80AC72C1B7B for ; Fri, 2 Sep 2016 18:50:20 +0000 (UTC) Date: Fri, 2 Sep 2016 18:50:20 +0000 (UTC) From: "ChiaPing Tsai (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-16541) Avoid unnecessary cell copy in Result.compareResults MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Sep 2016 18:50:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ChiaPing Tsai updated HBASE-16541: ---------------------------------- Status: Open (was: Patch Available) > Avoid unnecessary cell copy in Result.compareResults > ---------------------------------------------------- > > Key: HBASE-16541 > URL: https://issues.apache.org/jira/browse/HBASE-16541 > Project: HBase > Issue Type: Improvement > Reporter: ChiaPing Tsai > Assignee: ChiaPing Tsai > Attachments: HBASE-16541.v1.patch, HBASE-16541.v1.patch > > > {code:title=Bar.java|borderStyle=solid} > // Bytes.equals(a, b) should be replaced by Bytes.equals(a, off, len, b, off len); > public static void compareResults(Result res1, Result res2) > throws Exception { > ... > Cell[] ourKVs = res1.rawCells(); > Cell[] replicatedKVs = res2.rawCells(); > for (int i = 0; i < res1.size(); i++) { > if (!ourKVs[i].equals(replicatedKVs[i]) || > !Bytes.equals(CellUtil.cloneValue(ourKVs[i]), CellUtil.cloneValue(replicatedKVs[i]))) { > throw new Exception("This result was different: " > + res1.toString() + " compared to " + res2.toString()); > } > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)