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

ReservationId.compareTo ignores id when clustertimestamp is the same

    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

            People

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

              Dates

                Created:
                Updated:
                Resolved: