Skip to content

Commit

Permalink
Merge branch 'master' into 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Marz committed Jan 9, 2013
2 parents 6f53b95 + 35275c1 commit 1b1c1fd
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/clj/backtype/storm/scheduler/IsolationScheduler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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.