Skip to content

Commit 3285f4e

Browse files
author
Nathan Marz
committed
Merge branch 'master' into 0.8.2
2 parents 88bd39a + 35275c1 commit 3285f4e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/clj/backtype/storm/scheduler/IsolationScheduler.clj

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,17 @@
192192
(.blacklistHost cluster host))
193193
)))
194194

195-
(doseq [[top-id worker-specs] topology-worker-specs]
196-
(if-not (empty? worker-specs)
197-
(log-warn "Unable to isolate topology " top-id)
195+
(let [non-iso-topologies (->> topology-worker-specs
196+
(mapcat (fn [[top-id worker-specs]]
197+
(if-not (empty? worker-specs) [top-id])
198+
)))]
199+
(if (empty? non-iso-topologies)
200+
;; run default scheduler on non-isolated topologies
201+
(-<> topology-worker-specs
202+
allocated-topologies
203+
(leftover-topologies topologies <>)
204+
(DefaultScheduler/default-schedule <> cluster))
205+
(log-warn "Unstable to isolate topologies " (pr-str non-iso-topologies) ". Will wait for enough resources for isolated topologies before allocating any other resources.")
198206
))
199-
200-
201-
;; run default scheduler on iso topologies that didn't have enough slot + non-isolated topologies
202-
(-<> topology-worker-specs
203-
allocated-topologies
204-
(leftover-topologies topologies <>)
205-
(DefaultScheduler/default-schedule <> cluster))
206207
(.setBlacklistedHosts cluster orig-blacklist)
207208
))

0 commit comments

Comments
 (0)