hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9252) StringUtils.humanReadableInt(..) has a race condition
Date Tue, 05 Feb 2013 14:07:14 GMT

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

Hudson commented on HADOOP-9252:
--------------------------------

Integrated in Hadoop-Mapreduce-trunk #1335 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1335/])
    HADOOP-9252. In StringUtils, humanReadableInt(..) has a race condition and the synchronization
of limitDecimalTo2(double) can be avoided. (Revision 1442386)

     Result = SUCCESS
szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1442386
Files : 
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/FsUsage.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java
* /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java

                
> StringUtils.humanReadableInt(..) has a race condition
> -----------------------------------------------------
>
>                 Key: HADOOP-9252
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9252
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>            Priority: Minor
>             Fix For: 2.0.3-alpha
>
>         Attachments: c9252_20130127.patch, c9252_20130128.patch, c9252_20130203.patch,
c9252_20130204.patch
>
>
> humanReadableInt(..) incorrectly uses oneDecimal without synchronization.
> Also, limitDecimalTo2(double) correctly uses decimalFormat with synchronization.  However,
synchronization can be avoided for a better performance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message