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

buildCommandExecutor function leverages redundant params

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • yarn

    Description

      Current signature of `buildCommandExecutor` passes redundant params which can be reduced by passing container reference 

       

      protected CommandExecutor buildCommandExecutor(String wrapperScriptPath,
      String containerIdStr, String user, Path pidFile, Resource resource,
      File workDir, Map<String, String> environment)

       

      • `containerIdStr` can be derived from `container.getContainerId().toString()`
      • `resource` can be derived from `container.getResource()`
      • `environment` can be derived from container reference 

      this will allow extention of the function without constraining to paramters of the method 

      Container reference is safe as it is pass by reference it wont copy the entire the container object 

       

      Attachments

        Issue Links

          Activity

            People

              samrat007 Samrat Deb
              samrat007 Samrat Deb
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: