/** * Returns an object which can be used in a RunJobflow call. * @return an object which can be used in a RunJobflow call. */ public BootstrapActionConfig build() { if (replace) { args.add("--replace"); } return new BootstrapActionConfig() .withName("Configure Daemons") .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/configure-daemons") .withArgs(args)); } }
/** * Returns an object which can be used in a RunJobflow call. * @return an object which can be used in a RunJobflow call. */ public BootstrapActionConfig build() { return new BootstrapActionConfig() .withName("Configure Hadoop") .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/configure-hadoop") .withArgs(args)); } }
/** * Create a new run-if bootstrap action which lets you conditionally run bootstrap actions. * @param condition The condition to evaluate, if true the bootstrap action executes. * @param config The bootstrap action to execute in case of successful evaluation. * @return A BootstrapActionConfig to be provided when running a job flow. */ public BootstrapActionConfig newRunIf(String condition, BootstrapActionConfig config) { List<String> args = config.getScriptBootstrapAction().getArgs(); args.add(0, condition); args.add(1, config.getScriptBootstrapAction().getPath()); return new BootstrapActionConfig() .withName("Run If, " + config.getName()) .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/run-if") .withArgs(args)); }
/** * Returns an object which can be used in a RunJobflow call. * @return an object which can be used in a RunJobflow call. */ public BootstrapActionConfig build() { if (replace) { args.add("--replace"); } return new BootstrapActionConfig() .withName("Configure Daemons") .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/configure-daemons") .withArgs(args)); } }
/** * Returns an object which can be used in a RunJobflow call. * @return an object which can be used in a RunJobflow call. */ public BootstrapActionConfig build() { return new BootstrapActionConfig() .withName("Configure Hadoop") .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/configure-hadoop") .withArgs(args)); } }
/** * Create a new run-if bootstrap action which lets you conditionally run bootstrap actions. * @param condition The condition to evaluate, if true the bootstrap action executes. * @param config The bootstrap action to execute in case of successful evaluation. * @return A BootstrapActionConfig to be provided when running a job flow. */ public BootstrapActionConfig newRunIf(String condition, BootstrapActionConfig config) { List<String> args = config.getScriptBootstrapAction().getArgs(); args.add(0, condition); args.add(1, config.getScriptBootstrapAction().getPath()); return new BootstrapActionConfig() .withName("Run If, " + config.getName()) .withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath("s3://" + bucket + "/bootstrap-actions/run-if") .withArgs(args)); }
.withScriptBootstrapAction(new ScriptBootstrapActionConfig() .withPath(runner.s3Uri().toString()) .withArgs(remoteConfigurationFile.s3Uri().toString()));