Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BDBF717AEE for ; Thu, 21 May 2015 16:42:51 +0000 (UTC) Received: (qmail 88861 invoked by uid 500); 21 May 2015 16:42:45 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 88689 invoked by uid 500); 21 May 2015 16:42:45 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 86996 invoked by uid 99); 21 May 2015 16:42:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 16:42:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BA8BDE51BE; Thu, 21 May 2015 16:42:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mbertozzi@apache.org To: commits@hbase.apache.org Date: Thu, 21 May 2015 16:43:18 -0000 Message-Id: <7e494552a4634276a02e3061ef96f330@git.apache.org> In-Reply-To: <34b73dc8aca741f98a042221f8a76170@git.apache.org> References: <34b73dc8aca741f98a042221f8a76170@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [35/50] [abbrv] hbase git commit: HBASE-13722 Avoid non static method from BloomFilterUtil. HBASE-13722 Avoid non static method from BloomFilterUtil. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/88f19ab6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/88f19ab6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/88f19ab6 Branch: refs/heads/hbase-12439 Commit: 88f19ab6979c7012c3dd22b2f45db9f746c7736d Parents: 1fbde3a Author: anoopsjohn Authored: Wed May 20 22:18:45 2015 +0530 Committer: anoopsjohn Committed: Wed May 20 22:18:45 2015 +0530 ---------------------------------------------------------------------- .../org/apache/hadoop/hbase/util/BloomFilterUtil.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/88f19ab6/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java index 29b08d2..ff08f4b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java @@ -27,7 +27,7 @@ import org.apache.hadoop.hbase.classification.InterfaceAudience; * Utility methods related to BloomFilters */ @InterfaceAudience.Private -public class BloomFilterUtil { +public final class BloomFilterUtil { /** Record separator for the Bloom filter statistics human-readable string */ public static final String STATS_RECORD_SEP = "; "; @@ -54,6 +54,13 @@ public class BloomFilterUtil { (byte) 0x40, (byte) 0x80 }; + + /** + * Private constructor to keep this class from being instantiated. + */ + private BloomFilterUtil() { + } + /** * @param maxKeys * @param errorRate @@ -190,11 +197,6 @@ public class BloomFilterUtil { return contains(buf, offset, length, bloom); } - /** Should only be used in tests */ - boolean contains(byte[] buf, ByteBuffer bloom) { - return contains(buf, 0, buf.length, bloom); - } - public static boolean contains(byte[] buf, int offset, int length, ByteBuffer bloomBuf, int bloomOffset, int bloomSize, Hash hash, int hashCount) {