Github user d2r commented on a diff in the pull request: https://github.com/apache/storm/pull/845#discussion_r43809952 --- Diff: storm-core/src/clj/backtype/storm/zookeeper.clj --- @@ -186,6 +186,21 @@ (.. zk (getChildren) (forPath (normalize-path path)))) (catch Exception e (throw (wrap-in-runtime e))))) +;; Deletes the state inside the zookeeper for a key, for which the +;; contents of the key starts with nimbus host port information +(defn delete-node-blobstore + [^CuratorFramework zk ^String parent-path ^String host-port-info] + (let [parent-path (normalize-path parent-path) + child-path-list (if (exists-node? zk parent-path false) + (into [] (get-children zk parent-path false)) + [])] + (doseq [child child-path-list] + (if (.startsWith child host-port-info) + (do + (log-debug "delete-node " "child" child) + (delete-node zk (str parent-path "/" child))) + )))) --- End diff -- Can use `when` instead of `if ... do`
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---