 
 ;; TODO: slots that have dead executor should be reused as long as supervisor is active
 
+
+;; (defn- assigned-slots-from-scheduler-assignments [topology->assignment]
+;;   (->> topology->assignment
+;;        vals
+;;        (map (fn [^SchedulerAssignment a] (.getExecutorToSlot a)))
+;;        (mapcat vals)
+;;        (map (fn [^WorkerSlot s] {(.getNodeId s) #{(.getPort s)}}))
+;;        (apply merge-with set/union)
+;;        ))
+
 ;; public so it can be mocked out
 (defn compute-new-topology->executor->node+port [nimbus existing-assignments topologies scratch-topology-id]
   (let [conf (:conf nimbus)

       )))

(defn- available-slots
  [nimbus callback topologies]
  (let [storm-cluster-state (:storm-cluster-state nimbus)
        ^INimbus inimbus (:inimbus nimbus)
        
        supervisor-ids (.supervisors storm-cluster-state callback)
        supervisor-infos (all-supervisor-info storm-cluster-state callback)
        existing-slots (assigned-slots storm-cluster-state)

        supervisor-details (for [[id info] supervisor-infos]

                                                                               existing-assignments
                                                                               topology->alive-executors)
        available-slots (->> topologies
                             (available-slots nimbus)
                             (map (fn [[node-id port]] {node-id #{port}}))
                             (apply merge-with set/union))
        assigned-slots (assigned-slots storm-cluster-state)
