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

Remove unnecessary type casting when calling AbstractYarnScheduler#getSchedulerNode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 3.0.4, 3.1.2, 3.3.0, 3.2.1
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: