Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1953 [Umbrella] Public APIs needed for applications
  3. YARN-1942

Deprecate toString/fromString methods from ConverterUtils and move them to records classes like ContainerId/ApplicationId, etc.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.4.0
    • 2.8.0, 3.0.0-alpha1
    • api
    • None
    • Reviewed

    Description

      ConverterUtils has a bunch of functions that are useful to application masters. It should either be made public or we make some of the utilities in it public or we provide other external apis for application masters to use. Note that distributedshell and MR are both using these interfaces.

      For instance the main use case I see right now is for getting the application attempt id within the appmaster:
      String containerIdStr =
      System.getenv(Environment.CONTAINER_ID.name());
      ConverterUtils.toContainerId

      ContainerId containerId = ConverterUtils.toContainerId(containerIdStr);
      ApplicationAttemptId applicationAttemptId =
      containerId.getApplicationAttemptId();

      I don't see any other way for the application master to get this information. If there is please let me know.

      Attachments

        1. YARN-1942.1.patch
          6 kB
          Wangda Tan
        2. YARN-1942.10.patch
          209 kB
          Wangda Tan
        3. YARN-1942.11.patch
          213 kB
          Wangda Tan
        4. YARN-1942.12.patch
          213 kB
          Wangda Tan
        5. YARN-1942.13.patch
          213 kB
          Wangda Tan
        6. YARN-1942.2.patch
          21 kB
          Wangda Tan
        7. YARN-1942.3.patch
          21 kB
          Wangda Tan
        8. YARN-1942.4.patch
          19 kB
          Wangda Tan
        9. YARN-1942.5.patch
          160 kB
          Wangda Tan
        10. YARN-1942.6.patch
          208 kB
          Wangda Tan
        11. YARN-1942.8.patch
          208 kB
          Wangda Tan
        12. YARN-1942.9.patch
          208 kB
          Wangda Tan
        13. YARN-1942-branch-2.0012.patch
          213 kB
          Wangda Tan
        14. YARN-1942-branch-2.0013.patch
          213 kB
          Wangda Tan
        15. YARN-1942-branch-2.8.0013_.patch
          214 kB
          Wangda Tan
        16. YARN-1942-branch-2.8.0013.patch
          214 kB
          Wangda Tan

        Issue Links

          Activity

            People

              leftnoteasy Wangda Tan
              tgraves Thomas Graves
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: