Skip to content

Commit 40e092d

Browse files
author
Nathan Marz
committed
remove unecessary code
1 parent 6fbc06d commit 40e092d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/clj/backtype/storm/daemon/nimbus.clj

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,18 +258,11 @@
258258
(->> (all-supervisor-info storm-cluster-state callback)
259259
(map-val :hostname)))
260260

261+
;; TODO: this needs to be mocked out
261262
(defn- available-slots
262263
[conf storm-cluster-state callback]
263264
(let [supervisor-ids (.supervisors storm-cluster-state callback)
264-
supervisor-infos (all-supervisor-info storm-cluster-state callback)
265-
;; TODO: this is broken. need to maintain a map since last time
266-
;; supervisor hearbeats like is done for tasks
267-
;; maybe it's ok to trust ephemeral nodes here?
268-
;;[[id info]]
269-
;; (when (< (time-delta (:time-secs info))
270-
;; (conf NIMBUS-SUPERVISOR-TIMEOUT-SECS))
271-
;; [[id info]]
272-
;; )
265+
supervisor-infos (all-supervisor-info storm-cluster-state callback)
273266
all-slots (map-val (comp set :worker-ports) supervisor-infos)
274267
existing-slots (assigned-slots storm-cluster-state)
275268
]
@@ -412,7 +405,7 @@
412405

413406
;; public so it can be mocked out
414407
(defn compute-new-task->node+port [conf storm-id existing-assignment storm-cluster-state callback task-heartbeats-cache scratch?]
415-
(let [available-slots (available-slots conf storm-cluster-state callback)
408+
(let [available-slots (available-slots conf storm-cluster-state callback)
416409
storm-conf (read-storm-conf conf storm-id)
417410
all-task-ids (set (.task-ids storm-cluster-state storm-id))
418411

0 commit comments

Comments
 (0)