Permalink
Browse files

Merge branch 'master' into 0.9.0

  • Loading branch information...
2 parents 6f53b95 + 35275c1 commit 1b1c1fd68c7cb9e5cc676a43c1e78a57a9dd88ad @nathanmarz nathanmarz committed Jan 9, 2013
Showing with 11 additions and 10 deletions.
  1. +11 −10 src/clj/backtype/storm/scheduler/IsolationScheduler.clj
@@ -192,16 +192,17 @@
(.blacklistHost cluster host))
)))
- (doseq [[top-id worker-specs] topology-worker-specs]
- (if-not (empty? worker-specs)
- (log-warn "Unable to isolate topology " top-id)
+ (let [non-iso-topologies (->> topology-worker-specs
+ (mapcat (fn [[top-id worker-specs]]
+ (if-not (empty? worker-specs) [top-id])
+ )))]
+ (if (empty? non-iso-topologies)
+ ;; run default scheduler on non-isolated topologies
+ (-<> topology-worker-specs
+ allocated-topologies
+ (leftover-topologies topologies <>)
+ (DefaultScheduler/default-schedule <> cluster))
+ (log-warn "Unstable to isolate topologies " (pr-str non-iso-topologies) ". Will wait for enough resources for isolated topologies before allocating any other resources.")
))
-
-
- ;; run default scheduler on iso topologies that didn't have enough slot + non-isolated topologies
- (-<> topology-worker-specs
- allocated-topologies
- (leftover-topologies topologies <>)
- (DefaultScheduler/default-schedule <> cluster))
(.setBlacklistedHosts cluster orig-blacklist)
))

0 comments on commit 1b1c1fd

Please sign in to comment.