sb.getWrapperScriptPath().toString().length() > WIN_MAX_PATH) { throw new IOException(String.format( "Cannot launch container using script at path %s, because it exceeds " + "the maximum supported path length of %d characters. Consider " + "configuring shorter directories in %s.", sb.getWrapperScriptPath(), WIN_MAX_PATH, YarnConfiguration.NM_LOCAL_DIRS)); sb.writeLocalWrapperScript(launchDst, pidFile); } else { LOG.info("Container " + containerIdStr try { setScriptExecutable(launchDst, user); setScriptExecutable(sb.getWrapperScriptPath(), user); shExec = buildCommandExecutor(sb.getWrapperScriptPath().toString(), containerIdStr, user, pidFile, container.getResource(), new File(containerWorkDir.toUri().getPath()),
sb.getWrapperScriptPath().toString().length() > WIN_MAX_PATH) { throw new IOException(String.format( "Cannot launch container using script at path %s, because it exceeds " + "the maximum supported path length of %d characters. Consider " + "configuring shorter directories in %s.", sb.getWrapperScriptPath(), WIN_MAX_PATH, YarnConfiguration.NM_LOCAL_DIRS)); sb.writeLocalWrapperScript(launchDst, pidFile); } else { LOG.info("Container " + containerIdStr try { setScriptExecutable(launchDst, user); setScriptExecutable(sb.getWrapperScriptPath(), user); shExec = buildCommandExecutor(sb.getWrapperScriptPath().toString(), containerIdStr, user, pidFile, container.getResource(), new File(containerWorkDir.toUri().getPath()),
sb.getWrapperScriptPath().toString().length() > WIN_MAX_PATH) { throw new IOException(String.format( "Cannot launch container using script at path %s, because it exceeds " + "the maximum supported path length of %d characters. Consider " + "configuring shorter directories in %s.", sb.getWrapperScriptPath(), WIN_MAX_PATH, YarnConfiguration.NM_LOCAL_DIRS)); sb.writeLocalWrapperScript(launchDst, pidFile); } else { LOG.info("Container " + containerIdStr try { setScriptExecutable(launchDst, user); setScriptExecutable(sb.getWrapperScriptPath(), user); shExec = buildCommandExecutor(sb.getWrapperScriptPath().toString(), containerIdStr, user, pidFile, container.getResource(), new File(containerWorkDir.toUri().getPath()),
sb.getWrapperScriptPath().toString().length() > WIN_MAX_PATH) { throw new IOException(String.format( "Cannot launch container using script at path %s, because it exceeds " + "the maximum supported path length of %d characters. Consider " + "configuring shorter directories in %s.", sb.getWrapperScriptPath(), WIN_MAX_PATH, YarnConfiguration.NM_LOCAL_DIRS)); sb.writeLocalWrapperScript(launchDst, pidFile); } else { LOG.info("Container " + containerIdStr try { setScriptExecutable(launchDst, user); setScriptExecutable(sb.getWrapperScriptPath(), user); shExec = buildCommandExecutor(sb.getWrapperScriptPath().toString(), containerIdStr, user, pidFile, container.getResource(), new File(containerWorkDir.toUri().getPath()),
/** * Write out the wrapper script for the container launch script. This method * will create the script at the configured wrapper script path. * * @param launchDst the script to launch * @param pidFile the file that will hold the PID * @throws IOException if the wrapper script cannot be created * @see #getWrapperScriptPath */ public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { try (DataOutputStream out = lfs.create(wrapperScriptPath, EnumSet.of(CREATE, OVERWRITE)); PrintStream pout = new PrintStream(out, false, "UTF-8")) { writeLocalWrapperScript(launchDst, pidFile, pout); } }
@Override public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { writeSessionScript(launchDst, pidFile); super.writeLocalWrapperScript(launchDst, pidFile); }
public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { DataOutputStream out = null; PrintStream pout = null; try { out = lfs.create(wrapperScriptPath, EnumSet.of(CREATE, OVERWRITE)); pout = new PrintStream(out, false, "UTF-8"); writeLocalWrapperScript(launchDst, pidFile, pout); } finally { IOUtils.cleanup(LOG, pout, out); } }
public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { DataOutputStream out = null; PrintStream pout = null; try { out = lfs.create(wrapperScriptPath, EnumSet.of(CREATE, OVERWRITE)); pout = new PrintStream(out, false, "UTF-8"); writeLocalWrapperScript(launchDst, pidFile, pout); } finally { IOUtils.cleanup(LOG, pout, out); } }
@Override public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { writeSessionScript(launchDst, pidFile); super.writeLocalWrapperScript(launchDst, pidFile); }
@Override public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { writeSessionScript(launchDst, pidFile); super.writeLocalWrapperScript(launchDst, pidFile); }
public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { DataOutputStream out = null; PrintStream pout = null; try { out = lfs.create(wrapperScriptPath, EnumSet.of(CREATE, OVERWRITE)); pout = new PrintStream(out, false, "UTF-8"); writeLocalWrapperScript(launchDst, pidFile, pout); } finally { IOUtils.cleanup(LOG, pout, out); } }
@Override public void writeLocalWrapperScript(Path launchDst, Path pidFile) throws IOException { writeSessionScript(launchDst, pidFile); super.writeLocalWrapperScript(launchDst, pidFile); }