From commits-return-67316-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Tue Feb 6 13:47:57 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D1C37180657 for ; Tue, 6 Feb 2018 13:47:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C160E160C3A; Tue, 6 Feb 2018 12:47:56 +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 072D6160C61 for ; Tue, 6 Feb 2018 13:47:55 +0100 (CET) Received: (qmail 54887 invoked by uid 500); 6 Feb 2018 12:47:53 -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 54671 invoked by uid 99); 6 Feb 2018 12:47:53 -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; Tue, 06 Feb 2018 12:47:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13E12E96D8; Tue, 6 Feb 2018 12:47:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: zhangduo@apache.org To: commits@hbase.apache.org Date: Tue, 06 Feb 2018 12:47:57 -0000 Message-Id: In-Reply-To: <2107d98c0fea46a5972d72e5d7bc6f1c@git.apache.org> References: <2107d98c0fea46a5972d72e5d7bc6f1c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [05/18] hbase git commit: HBASE-19922 remove ProtobufUtil::PRIMITIVES HBASE-19922 remove ProtobufUtil::PRIMITIVES Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8de82078 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8de82078 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8de82078 Branch: refs/heads/HBASE-19064 Commit: 8de820786ce8d708a6d2fd32b36ab9128bc6fc0f Parents: 6307689 Author: Mike Drob Authored: Fri Feb 2 15:59:52 2018 -0600 Committer: Mike Drob Committed: Mon Feb 5 15:33:46 2018 -0600 ---------------------------------------------------------------------- .../apache/hadoop/hbase/protobuf/ProtobufUtil.java | 16 ---------------- .../hadoop/hbase/shaded/protobuf/ProtobufUtil.java | 16 ---------------- 2 files changed, 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/8de82078/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java index eed911a..29ff2a2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java @@ -34,7 +34,6 @@ import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -123,11 +122,6 @@ public final class ProtobufUtil { } /** - * Primitive type to class mapping. - */ - private final static Map> PRIMITIVES = new HashMap<>(); - - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. */ @@ -183,16 +177,6 @@ public final class ProtobufUtil { ClassLoader parent = ProtobufUtil.class.getClassLoader(); Configuration conf = HBaseConfiguration.create(); CLASS_LOADER = new DynamicClassLoader(conf, parent); - - PRIMITIVES.put(Boolean.TYPE.getName(), Boolean.TYPE); - PRIMITIVES.put(Byte.TYPE.getName(), Byte.TYPE); - PRIMITIVES.put(Character.TYPE.getName(), Character.TYPE); - PRIMITIVES.put(Short.TYPE.getName(), Short.TYPE); - PRIMITIVES.put(Integer.TYPE.getName(), Integer.TYPE); - PRIMITIVES.put(Long.TYPE.getName(), Long.TYPE); - PRIMITIVES.put(Float.TYPE.getName(), Float.TYPE); - PRIMITIVES.put(Double.TYPE.getName(), Double.TYPE); - PRIMITIVES.put(Void.TYPE.getName(), Void.TYPE); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/8de82078/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java index 06d9a3c..5bb3b4b 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java @@ -27,7 +27,6 @@ import java.lang.reflect.Method; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; @@ -201,11 +200,6 @@ public final class ProtobufUtil { } /** - * Primitive type to class mapping. - */ - private final static Map> PRIMITIVES = new HashMap<>(); - - /** * Many results are simple: no cell, exists true or false. To save on object creations, * we reuse them across calls. */ @@ -260,16 +254,6 @@ public final class ProtobufUtil { ClassLoader parent = ProtobufUtil.class.getClassLoader(); Configuration conf = HBaseConfiguration.create(); CLASS_LOADER = new DynamicClassLoader(conf, parent); - - PRIMITIVES.put(Boolean.TYPE.getName(), Boolean.TYPE); - PRIMITIVES.put(Byte.TYPE.getName(), Byte.TYPE); - PRIMITIVES.put(Character.TYPE.getName(), Character.TYPE); - PRIMITIVES.put(Short.TYPE.getName(), Short.TYPE); - PRIMITIVES.put(Integer.TYPE.getName(), Integer.TYPE); - PRIMITIVES.put(Long.TYPE.getName(), Long.TYPE); - PRIMITIVES.put(Float.TYPE.getName(), Float.TYPE); - PRIMITIVES.put(Double.TYPE.getName(), Double.TYPE); - PRIMITIVES.put(Void.TYPE.getName(), Void.TYPE); } /**