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

Incorrect ReservationId.compareTo() implementation

VotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Reviewed
    • 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.1.patch
          2 kB
          Oleg Danilov
        2. YARN-7023.patch
          2 kB
          Oleg Danilov

        Issue Links

        Activity

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

          People

            olegd Oleg Danilov
            olegd Oleg Danilov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment