Class DefaultContainerExecutor.LocalWrapperScriptBuilder

java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.LocalWrapperScriptBuilder
Enclosing class:
DefaultContainerExecutor

protected abstract class DefaultContainerExecutor.LocalWrapperScriptBuilder extends Object
This class is a utility to create a wrapper script that is platform appropriate.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LocalWrapperScriptBuilder(org.apache.hadoop.fs.Path containerWorkDir)
    Create an instance for the given container working directory.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.fs.Path
    Return the path for the wrapper script.
    void
    writeLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile)
    Write out the wrapper script for the container launch script.
    protected abstract void
    writeLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile, PrintStream pout)
    Write out the wrapper script for the container launch script.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocalWrapperScriptBuilder

      protected LocalWrapperScriptBuilder(org.apache.hadoop.fs.Path containerWorkDir)
      Create an instance for the given container working directory.
      Parameters:
      containerWorkDir - the working directory for the container
  • Method Details

    • getWrapperScriptPath

      public org.apache.hadoop.fs.Path getWrapperScriptPath()
      Return the path for the wrapper script.
      Returns:
      the path for the wrapper script
    • writeLocalWrapperScript

      public void writeLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile) throws IOException
      Write out the wrapper script for the container launch script. This method will create the script at the configured wrapper script path.
      Parameters:
      launchDst - the script to launch
      pidFile - the file that will hold the PID
      Throws:
      IOException - if the wrapper script cannot be created
      See Also:
    • writeLocalWrapperScript

      protected abstract void writeLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile, PrintStream pout)
      Write out the wrapper script for the container launch script.
      Parameters:
      launchDst - the script to launch
      pidFile - the file that will hold the PID
      pout - the stream to use to write out the wrapper script