Skip to content

Commit

Permalink
SetActionOnFailure should be called for the StepConfig object
Browse files Browse the repository at this point in the history
  • Loading branch information
Brubacher, Federico authored and Brubacher, Federico committed Nov 19, 2012
1 parent d8ebad6 commit 3a9f4fa
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/clj/com/climate/services/aws/emr.clj
Expand Up @@ -231,16 +231,15 @@
action-on-failure is a String or enum com.amazonaws.services.elasticmapreduce.model.ActionOnFailure.
properties is a map of Java properties that are set when the step runs."
(let [sc (StepConfig. name
(doto
(HadoopJarStepConfig.)
(.setJar jar-path)
(.setMainClass main-class)
(.setArgs (vec cli-args)) ;collection of strings
(.setProperties (kv-props properties))
(.setActionOnFailure (str (or action-on-failure
(and alive? ActionOnFailure/CANCEL_AND_WAIT)
ActionOnFailure/TERMINATE_JOB_FLOW)))))]
sc))
(doto
(HadoopJarStepConfig.)
(.setJar jar-path)
(.setMainClass main-class)
(.setArgs (vec cli-args)) ;collection of strings
(.setProperties (kv-props properties))))]
(.setActionOnFailure sc (str (or action-on-failure
(and alive? ActionOnFailure/CANCEL_AND_WAIT)
ActionOnFailure/TERMINATE_JOB_FLOW)))))

(defn add-steps
"Add a step to a running jobflow. Steps is a seq of StepConfig objects.
Expand Down

0 comments on commit 3a9f4fa

Please sign in to comment.