[
https://issues.apache.org/jira/browse/YARN-6296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Haibo Chen updated YARN-6296:
-----------------------------
Description:
Per YARN-6252
{code:java}
public int compareTo(ReservationId other) {
if (this.getClusterTimestamp() - other.getClusterTimestamp() == 0) {
return getId() > getId() ? 1 : getId() < getId() ? -1 : 0;
} else {
}
}
{code}
compares id with itself. It should be
{code}
return this.getId() > other.getId() ? 1 : (this.getId() < other.getId() ? -1 :
0);
{code}
was:
Per YARN-6252
{code:java}
public int compareTo(ReservationId other) {
if (this.getClusterTimestamp() - other.getClusterTimestamp() == 0) {
return getId() > getId() ? 1 : getId() < getId() ? -1 : 0;
} else {
}
}
{code}
compares id with itself. It should be
return this.getId() > other.getId() ? 1 : (this.getId() < other.getId() ? -1 :
0);
> ReservationId.compareTo ignores id when clustertimestamp is the same
> --------------------------------------------------------------------
>
> Key: YARN-6296
> URL: https://issues.apache.org/jira/browse/YARN-6296
> Project: Hadoop YARN
> Issue Type: Bug
> Affects Versions: 3.0.0-alpha2
> Reporter: Haibo Chen
> Labels: newbie
>
> Per YARN-6252
> {code:java}
> public int compareTo(ReservationId other) {
> if (this.getClusterTimestamp() - other.getClusterTimestamp() == 0) {
> return getId() > getId() ? 1 : getId() < getId() ? -1 : 0;
> } else {
> }
> }
> {code}
> compares id with itself. It should be
> {code}
> return this.getId() > other.getId() ? 1 : (this.getId() < other.getId() ? -1
> : 0);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]