You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by revans2 <gi...@git.apache.org> on 2016/09/07 17:21:08 UTC

[GitHub] storm issue #1677: STORM-1985: Admin Commands

Github user revans2 commented on the issue:

    https://github.com/apache/storm/pull/1677
  
    For reference the original code that this is replacing was
    ```
    (defn cleanup-corrupt-topologies! [nimbus]
      (let [storm-cluster-state (:storm-cluster-state nimbus)
            blob-store (:blob-store nimbus)
            code-ids (set (code-ids blob-store))
            active-topologies (set (.active-storms storm-cluster-state))
            corrupt-topologies (set/difference active-topologies code-ids)]
        (doseq [corrupt corrupt-topologies]
          (log-message "Corrupt topology " corrupt " has state on zookeeper but doesn't have a local dir on Nimbus. Cleaning up...")
          (.remove-storm! storm-cluster-state corrupt)
          (if (instance? LocalFsBlobStore blob-store)
            (doseq [blob-key (get-key-list-from-id (:conf nimbus) corrupt)]
              (.remove-blobstore-key! storm-cluster-state blob-key))))))
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---