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

Incorrect ReservationId.compareTo() implementation

    Details

    • Hadoop Flags:
      Reviewed
    • Flags:
      Patch

      Description

      Obviously this is a typo and the second getId() call should be rewritten as 'other.getId()'

      Lines 94-102

        @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;
          }
        }
      

        Attachments

        1. YARN-7023.patch
          2 kB
          Oleg Danilov
        2. YARN-7023.1.patch
          2 kB
          Oleg Danilov

          Issue Links

            Activity

              People

              • Assignee:
                olegd Oleg Danilov
                Reporter:
                olegd Oleg Danilov
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: