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

Single parameter Resource / LightWeightResource constructor looks confusing

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: api
    • Labels:
      None

      Description

      The single parameter (long) constructor in Resource / LightWeightResource sets all resource components to the same value.
      Since there are other constructors in these classes with (long, int) parameters where the semantics are different, it could be confusing for the users.
      The perfect place to create such a resource would be in the Resources class, with a method named like "createResourceWithSameValue".

        Attachments

        1. YARN-8524.003.patch
          8 kB
          Szilard Nemeth
        2. YARN-8524.002.patch
          7 kB
          Szilard Nemeth
        3. YARN-8524.001.patch
          7 kB
          Szilard Nemeth

          Issue Links

            Activity

              People

              • Assignee:
                snemeth Szilard Nemeth
                Reporter:
                snemeth Szilard Nemeth
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: