hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18389) Remove byte[] from formal parameter of sizeOf() of ClassSize, ClassSize.MemoryLayout and ClassSize.UnsafeLayout
Date Sat, 22 Jul 2017 00:03:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097015#comment-16097015
] 

Hudson commented on HBASE-18389:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #3414 (See [https://builds.apache.org/job/HBase-Trunk_matrix/3414/])
HBASE-18389 Remove byte[] from formal parameter of sizeOf() of (chia7712: rev 31c3edaa29776b63cc69ecd37306ad10836992eb)
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java


> Remove byte[] from formal parameter of sizeOf() of ClassSize, ClassSize.MemoryLayout
and ClassSize.UnsafeLayout
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18389
>                 URL: https://issues.apache.org/jira/browse/HBASE-18389
>             Project: HBase
>          Issue Type: Improvement
>          Components: util
>            Reporter: Xiang Li
>            Assignee: Xiang Li
>            Priority: Minor
>             Fix For: 3.0.0, 2.0.0-alpha-2
>
>         Attachments: HBASE-18389.master.000.patch, HBASE-18389.master.001.patch, HBASE-18389.master.002.patch,
HBASE-18389.master.003.patch
>
>
> In ClassSize class and its internal static class, sizeOf() function has 2 formal parameters:
byte[] b and int len. But the function's internal logic does not use or refer to byte[] b.
Could be removed.
> {code:title=hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java|borderStyle=solid}
> // Class of ClassSize
> public static long sizeOf(byte[] b, int len) {
>   return memoryLayout.sizeOf(b, len);
> }
> // Class of ClassSize.MemoryLayout
> long sizeOf(byte[] b, int len) {
>   return align(arrayHeaderSize() + len);
> }
> // Class of ClassSize.UnsafeLayout
> long sizeOf(byte[] b, int len) {
>   return align(arrayHeaderSize() + len * UnsafeAccess.theUnsafe.ARRAY_BYTE_INDEX_SCALE);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message