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 25DDF114E4 for ; Mon, 14 Jul 2014 03:45:06 +0000 (UTC) Received: (qmail 3368 invoked by uid 500); 14 Jul 2014 03:45:05 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 3318 invoked by uid 500); 14 Jul 2014 03:45:05 -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 3307 invoked by uid 99); 14 Jul 2014 03:45:05 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 03:45:05 +0000 Date: Mon, 14 Jul 2014 03:45:05 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-11507) Enhance test-patch.sh to check for direct calls to HBaseZeroCopyByteString.wrap() 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-11507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14060294#comment-14060294 ] stack commented on HBASE-11507: ------------------------------- bq. I disagree... ... is usually followed by argument/justification. Add this at least the below [~gustavoanatoly] so that the unusual developer who happens to stumble upon the zero copy byte string optimization (totally by-passing our use of ByteStringer elsewhere throughout the codebase) is suitably discouraged.... {code} diff --git a/hbase-protocol/src/main/java/com/google/protobuf/HBaseZeroCopyByteString.java b/hbase-protocol/src/main/java/com/google/protobuf/HBaseZeroCopyByteString.java index f7e9c7f..7f59c9c 100644 --- a/hbase-protocol/src/main/java/com/google/protobuf/HBaseZeroCopyByteString.java +++ b/hbase-protocol/src/main/java/com/google/protobuf/HBaseZeroCopyByteString.java @@ -26,7 +26,10 @@ package com.google.protobuf; // This is a lie. * from C buffer to JVM buffer). * * @since 0.96.1 + * @deprecated Do not use directly. Instead go via org.apache.hadoop.hbase.util.ByteStringer + * class instead. See HBASE-11118 */ +@Deprecated public final class HBaseZeroCopyByteString extends LiteralByteString { // Gotten from AsyncHBase code base with permission. /** Private constructor so this class cannot be instantiated. */ {code} Thanks. > Enhance test-patch.sh to check for direct calls to HBaseZeroCopyByteString.wrap() > --------------------------------------------------------------------------------- > > Key: HBASE-11507 > URL: https://issues.apache.org/jira/browse/HBASE-11507 > Project: HBase > Issue Type: Task > Reporter: Ted Yu > Assignee: Gustavo Anatoly > Priority: Trivial > Attachments: HBASE-11507.patch > > > HBaseZeroCopyByteString.wrap() should not be called directly. > ByteStringer.wrap() should be called instead. > This task adds check for direct calls to HBaseZeroCopyByteString.wrap() to test-patch.sh. -- This message was sent by Atlassian JIRA (v6.2#6252)