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

Remove unnecessary type casting when calling AbstractYarnScheduler#getSchedulerNode

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.4, 3.1.2, 3.3.0, 3.2.1
    • Component/s: None
    • Labels:
      None

      Description

      Due to the AbstractYarnScheduler#getSchedulerNode method return the generic type, so I think don't need explicit type. 

      I found this issue in CapacityScheduler class. The warning message like:

      Casting 'getSchedulerNode( nonKillableContainer.getAllocatedNode())' to 'FiCaSchedulerNode' is redundant

        Attachments

        1. YARN-8977.001.patch
          2 kB
          Wanqiang Ji
        2. YARN-8977.002.patch
          4 kB
          Wanqiang Ji

          Issue Links

            Activity

              People

              • Assignee:
                jiwq Wanqiang Ji
                Reporter:
                jiwq Wanqiang Ji
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: