You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/02/28 17:02:04 UTC

[jira] [Commented] (YARN-2706) Math.abs() is called on random integer in DefaultContainerExecutor#getWorkingDir()

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

Ted Yu commented on YARN-2706:
------------------------------

lgtm

> Math.abs() is called on random integer in DefaultContainerExecutor#getWorkingDir()
> ----------------------------------------------------------------------------------
>
>                 Key: YARN-2706
>                 URL: https://issues.apache.org/jira/browse/YARN-2706
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: haosdent
>            Priority: Minor
>         Attachments: YARN-2706.patch
>
>
> Here is the code:
> {code}
>     long randomPosition = Math.abs(r.nextLong()) % totalAvailable;
> {code}
> See http://stackoverflow.com/questions/7567350/findbugs-rv-absolute-value-of-random-int-warning



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