Class DefaultContainerExecutor.LocalWrapperScriptBuilder
java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.LocalWrapperScriptBuilder
- Enclosing class:
- DefaultContainerExecutor
This class is a utility to create a wrapper script that is platform
appropriate.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLocalWrapperScriptBuilder(org.apache.hadoop.fs.Path containerWorkDir) Create an instance for the given container working directory. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.PathReturn the path for the wrapper script.voidwriteLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile) Write out the wrapper script for the container launch script.protected abstract voidwriteLocalWrapperScript(org.apache.hadoop.fs.Path launchDst, org.apache.hadoop.fs.Path pidFile, PrintStream pout) Write out the wrapper script for the container launch script.
-
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 launchpidFile- 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 launchpidFile- the file that will hold the PIDpout- the stream to use to write out the wrapper script
-