hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira Ajisaka (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13202) Implementation of getNBytes in org.apache.hadoop.util.bloom.BloomFilter might be changed
Date Sat, 16 Jul 2016 05:09:20 GMT

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

Akira Ajisaka commented on HADOOP-13202:
----------------------------------------

Thanks [~lewuathe] for providing the patch.
Would you replace {{Math.toIntExact}} with {{(int)}} for backporting to branch-2? branch-2
still supports JDK7, and I'm thinking {{(int)}} is fine because {{(long)(any int value) +
7 / 8}} is always in {{\[Integer.MIN_VALUE, Integer.MAX_VALUE\]}}.

> Implementation of getNBytes in org.apache.hadoop.util.bloom.BloomFilter might be changed
> ----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13202
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13202
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.7.2
>            Reporter: zhengbing li
>            Assignee: Kai Sasaki
>         Attachments: HADOOP-13202.01.patch, HADOOP-13202.02.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Current implementation:
> return (vectorSize + 7) / 8;
> when vectorSize is 2147483647´╝łthe max value of Int), error :"java.lang.NegativeArraySizeException"
will report 
> the implementation might be changed
> return (int)(((long)vectorSize + 7) / 8);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message