Permalink
Browse files

SetActionOnFailure should be called for the StepConfig object

  • Loading branch information...
1 parent d8ebad6 commit 3a9f4fa304553bedcc11df430481a80cb416f0b5 Brubacher, Federico committed Nov 19, 2012
Showing with 9 additions and 10 deletions.
  1. +9 −10 src/main/clj/com/climate/services/aws/emr.clj
@@ -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.

0 comments on commit 3a9f4fa

Please sign in to comment.