You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2016/08/01 23:04:20 UTC

[jira] [Updated] (HBASE-16272) Overflow in ServerName's compareTo method

     [ https://issues.apache.org/jira/browse/HBASE-16272?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-16272:
-----------------------------------
    Fix Version/s:     (was: 0.98.21)

> Overflow in ServerName's compareTo method
> -----------------------------------------
>
>                 Key: HBASE-16272
>                 URL: https://issues.apache.org/jira/browse/HBASE-16272
>             Project: HBase
>          Issue Type: Bug
>          Components: hbase
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>             Fix For: 2.0.0, 1.3.0, 1.4.0, 1.1.6, 1.2.3
>
>         Attachments: HBASE-16272-v001.patch
>
>
> Looking at the ServerName's compareTo(), 
> https://github.com/apache/hbase/blob/master/hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java#L303
> It converts the return int value by converting long to int like (int)(longValue), which could be incorrect when it overflows, need to replace it with Long.compareTo(a,b).
> [~mbertozzi] found some others as well, such as
> https://github.com/apache/hbase/blob/master/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/LruBlockCache.java#L990



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