hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Junping Du (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7023) Incorrect ReservationId.compareTo() implementation
Date Tue, 05 Sep 2017 23:50:00 GMT

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

Junping Du commented on YARN-7023:
----------------------------------

no worry. It happens always. :)

> Incorrect ReservationId.compareTo() implementation
> --------------------------------------------------
>
>                 Key: YARN-7023
>                 URL: https://issues.apache.org/jira/browse/YARN-7023
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: reservation system
>    Affects Versions: 2.6.0, 3.0.0-alpha1
>            Reporter: Oleg Danilov
>            Assignee: Oleg Danilov
>            Priority: Minor
>             Fix For: 2.9.0, 3.0.0-beta1, 2.8.2, 3.1.0
>
>         Attachments: YARN-7023.1.patch, YARN-7023.patch
>
>
> Obviously this is a typo and the second getId() call should be rewritten as 'other.getId()'
> +Lines 94-102+
> {code:java}
>   @Override
>   public int compareTo(ReservationId other) {
>     if (this.getClusterTimestamp() - other.getClusterTimestamp() == 0) {
>       return getId() > getId() ? 1 : getId() < getId() ? -1 : 0;
>     } else {
>       return this.getClusterTimestamp() > other.getClusterTimestamp() ? 1
>           : this.getClusterTimestamp() < other.getClusterTimestamp() ? -1 : 0;
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message