Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-6296

ReservationId.compareTo ignores id when clustertimestamp is the same

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.0.0-alpha2
    • None
    • None

    Description

      Per YARN-6252

        public int compareTo(ReservationId other) {
          if (this.getClusterTimestamp() - other.getClusterTimestamp() == 0) {
            return getId() > getId() ? 1 : getId() < getId() ? -1 : 0;
          } else {
          }
        }
      

      compares id with itself. It should be

      return this.getId() > other.getId() ? 1 : (this.getId() < other.getId() ? -1 : 0);
      

      Attachments

        1. YARN-6296.001.patch
          1 kB
          Yeliang Cang

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            haibochen Haibo Chen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment