Github user priyank5485 commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1277#discussion_r57950485
  
    --- Diff: storm-core/src/clj/org/apache/storm/ui/core.clj ---
    @@ -466,6 +466,21 @@
            "assignedCpu" (.get_assigned_cpu t)})
         "schedulerDisplayResource" (*STORM-CONF* 
Config/SCHEDULER_DISPLAY_RESOURCE)}))
     
    +(defn get-topology-id [topology-name-or-id]
    +  (let [summary ((all-topologies-summary) "topologies")
    +        filter-fun-name (fn[topo-summary] (= (topo-summary "name") 
topology-name-or-id))
    +        filter-fun-id (fn[topo-summary] (= (topo-summary "id") 
topology-name-or-id))
    +        matching-topologies-by-name (filter filter-fun-name summary)
    +        matching-topologies-by-id (filter filter-fun-id summary)
    +        matching-topologies
    +        (cond
    +          (not-empty matching-topologies-by-name) 
matching-topologies-by-name
    +          (not-empty matching-topologies-by-id) matching-topologies-by-id
    +          :else nil)
    +        _ (when (empty? matching-topologies) (throw (NotAliveException. 
(str topology-name-or-id " is not alive"))))
    +        id ((first matching-topologies) "id")]
    +    id))
    --- End diff --
    
    @knusbaum Thats true. But if we prioritize ids would not your topology 
become inaccessible? I think going forward we should use topology names in ui 
and elsewhere so that we can have permanent links and since thats the 
identifier given by the user. Support for lookup with ids was added for 
backwards compatibility as suggested by @revans2 and others.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to