hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom White (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HDFS-288) Redundant computation in hashCode() implemenation
Date Mon, 07 Sep 2009 11:11:57 GMT

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

Tom White updated HDFS-288:
---------------------------

       Resolution: Fixed
    Fix Version/s: 0.21.0
     Hadoop Flags: [Incompatible change, Reviewed]  (was: [Incompatible change])
           Status: Resolved  (was: Patch Available)

I've just committed this. Thanks Nicholas!

(Test failure was unrelated.)

> Redundant computation in hashCode() implemenation
> -------------------------------------------------
>
>                 Key: HDFS-288
>                 URL: https://issues.apache.org/jira/browse/HDFS-288
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>             Fix For: 0.21.0
>
>         Attachments: h288_20090820.patch
>
>
> In some hashCode() implementation (e.g. Block.hashCode()), the formula has the form
> {noformat}
> 37 * 17 + f(x),
> {noformat}
> where f( x ) is some function.  Adding 37*17 to f( x ) shifts the value of f( x ).  It
is not effective to do shifting in hash functions.  The computation is redundant.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message