           ))
 
       (^void rebalance [this ^String storm-name ^RebalanceOptions options]
+        (ensure-leadership leader-elections)
         (check-storm-active! nimbus storm-name true)
         (let [wait-amt (if (.is_set_wait_secs options)
                          (.get_wait_secs options))

          ))

      (^void finishFileUpload [this ^String location]
        (let [uploaders (:uploaders nimbus)
              ^WritableByteChannel channel (.get uploaders location)]
          (when-not channel

          ))

      (^void uploadChunk [this ^String location ^ByteBuffer chunk]
        (ensure-leadership leader-elections)
        (let [uploaders (:uploaders nimbus)
              ^WritableByteChannel channel (.get uploaders location)]
          (when-not channel
