Source:
<code>public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } <START> Pair<Long, Long> memPair = getProcMemoryRequirement(); <END> boolean memGranted = SystemMemoryInfo.requestMemory(memPair.getFirst(), memPair.getSecond()); if (!memGranted) { throw new Exception(String.format("Cannot request memory (Xms %d kb, Xmx %d kb) from system for job %s", memPair.getFirst(), memPair.getSecond(), getId())); } List<String> commands = null; try { commands = getCommandList(); } catch (Exception e) { handleError("Job set up failed " + e.getCause(), e); } long startMs = System.currentTimeMillis(); if (commands == null) { handleError("There are no commands to execute", null); } info(commands.size() + " commands to execute."); File[] propFiles = initPropsFiles(); Map<String, String> envVars = getEnvironmentVariables(); for (String command : commands) { info("Command: " + command); AzkabanProcessBuilder builder = new AzkabanProcessBuilder(partitionCommandLine(command)) .setEnv(envVars).setWorkingDir(getCwd()).setLogger(getLog()); if (builder.getEnv().size() > 0) { info("Environment variables: " + builder.getEnv()); } info("Working directory: " + builder.getWorkingDir()); boolean success = false; this.process = builder.build(); try { this.process.run(); success = true; } catch (Throwable e) { for (File file : propFiles) if (file != null && file.exists()) file.delete(); throw new RuntimeException(e); } finally { this.process = null; info("Process completed " + (success ? "successfully" : "unsuccessfully") + " in " + ((System.currentTimeMillis() - startMs) / 1000) + " seconds."); } } generateProperties(propFiles[1]); }</code><technical_language>a good I idea a config enable disable this feature azkaban.properties curl requests</technical_language>

Target:
public void run() throws Exception { try { resolveProps(); } catch (Exception e) { handleError("Bad property definition! " + e.getMessage(), e); } if (sysProps.getBoolean(MEMCHECK_ENABLED, true)) { long freeMemDecrAmt = sysProps.getLong(MEMCHECK_FREEMEMDECRAMT, 0); Pair<Long, Long> memPair = getProcMemoryRequirement(); boolean isMemGranted = SystemMemoryInfo.canSystemGrantMemory(memPair.getFirst(), memPair.getSecond(), freeMemDecrAmt); if (!isMemGranted) { throw new Exception(String.format("Cannot request memory (Xms %d kb, Xmx %d kb) from system for job %s", memPair.getFirst(), memPair.getSecond(), getId())); } } List<String> commands = null; try { commands = getCommandList(); } catch (Exception e) { handleError("Job set up failed " + e.getCause(), e); } long startMs = System.currentTimeMillis(); if (commands == null) { handleError("There are no commands to execute", null); } info(commands.size() + " commands to execute."); File[] propFiles = initPropsFiles(); Map<String, String> envVars = getEnvironmentVariables(); for (String command : commands) { info("Command: " + command); AzkabanProcessBuilder builder = new AzkabanProcessBuilder(partitionCommandLine(command)) .setEnv(envVars).setWorkingDir(getCwd()).setLogger(getLog()); if (builder.getEnv().size() > 0) { info("Environment variables: " + builder.getEnv()); } info("Working directory: " + builder.getWorkingDir()); boolean success = false; this.process = builder.build(); try { this.process.run(); success = true; } catch (Throwable e) { for (File file : propFiles) if (file != null && file.exists()) file.delete(); throw new RuntimeException(e); } finally { this.process = null; info("Process completed " + (success ? "successfully" : "unsuccessfully") + " in " + ((System.currentTimeMillis() - startMs) / 1000) + " seconds."); } } generateProperties(propFiles[1]); }