hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11507) Enhance test-patch.sh to check for direct calls to HBaseZeroCopyByteString.wrap()
Date Mon, 14 Jul 2014 03:45:05 GMT

    [ 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)

Mime
View raw message