[ 
https://issues.apache.org/jira/browse/STORM-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218677#comment-15218677
 ] 

ASF GitHub Bot commented on STORM-1129:
---------------------------------------

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.


> Storm should use topology name instead of ids for url in storm UI.
> ------------------------------------------------------------------
>
>                 Key: STORM-1129
>                 URL: https://issues.apache.org/jira/browse/STORM-1129
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-core
>            Reporter: Priyank Shah
>            Assignee: Priyank Shah
>
> Currently, in storm UI details about a topology can be viewed at a URL which 
> has a topology id as a query parameter. When a topology is updated and  
> redeployed a new id is assigned by storm and existing URL(and any bookmarks 
> relying on it) for the topology do not work since the id has changed. We 
> should change it so that topology name is used instead of id.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to