Skip to content

STORM-1129: Use topology name instead of id in UI calls. - #854

Closed
priyank5485 wants to merge 1 commit into
apache:masterfrom
priyank5485:STORM-1129
Closed

STORM-1129: Use topology name instead of id in UI calls.#854
priyank5485 wants to merge 1 commit into
apache:masterfrom
priyank5485:STORM-1129

Conversation

@priyank5485

Copy link
Copy Markdown
Contributor

Note that all-topologies-summary has been used to get topology id from a topology name. That involves a few calls to zookeeper which is not ideal. However, UI does not seem to take any significant performance hit. If needed we can handle it possibly using one of the options below. Since its a separate performance issue we can handle it in a separate JIRA.

  1. Have nimbus thrift server cache summary for topologies so it does not hit zookeeper every time we try to get topology id from name.
  2. Update nimbus thrift api with a method that takes options and use that to do only the minimal necessary interaction with zookeeper for a given option.

@jerrypeng

Copy link
Copy Markdown
Contributor

Topology names are not unique. Users can submit topologies with the same name, but the their auto generated topology ids will be unique. I am not sure this is the right way to go about this

@revans2

Copy link
Copy Markdown
Contributor

@jerrypeng they can submit topologies with the same name, but not at the same time. You can only have one "foo" topology running at any point in time.

@priyank5485

Copy link
Copy Markdown
ContributorAuthor

@jerrypeng We have a check and it throws the following exception.

Exception in thread "main" java.lang.RuntimeException: Topology with name wordcount already exists on cluster
at backtype.storm.StormSubmitter.submitTopologyAs(StormSubmitter.java:231)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:275)
at backtype.storm.StormSubmitter.submitTopologyWithProgressBar(StormSubmitter.java:311)
at backtype.storm.StormSubmitter.submitTopologyWithProgressBar(StormSubmitter.java:292)
at storm.starter.WordCountTopology.main(WordCountTopology.java:94)

@revans2 Thanks for chiming in.

@harshach

Copy link
Copy Markdown
Contributor

@jerrypeng topology names are unique

@Parth-Brahmbhatt

Copy link
Copy Markdown
Contributor

+1.

@jerrypeng

Copy link
Copy Markdown
Contributor

thanks for the explanation and clarification everybody

@revans2

Copy link
Copy Markdown
Contributor

This is a non-backwards compatible change to the REST API and I really would prefer to maintain compatibility if at all possible. It seems fairly simple to make the REST API work with the name or the id. We call get-id-from-name all over the place, it seems fairly simple to check to see if there is a topology with that as the ID, if not check to see if there is a topology with it as the name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to populate the context before ever talking to nimbus. get-id-from-name talks to nimbus and could potentially authenticate with the wrong user to nimbus. This needs to be fixed everywhere.

@revans2

Copy link
Copy Markdown
Contributor

@priyank5485 for the most part this change looks good to me, but there are a few serious bugs/incompatibilities that need to be fixed before this can go in.

@Parth-Brahmbhatt

Copy link
Copy Markdown
Contributor

I agree with @revans2 , lets maintain backward compatibility.

@priyank5485

Copy link
Copy Markdown
ContributorAuthor

@revans2@Parth-Brahmbhatt@jerrypeng@harshach Thanks all for the feedback. Other than the changes here there are some commits to apache/master after creation of this PR which added some more apis in UI using topology id making this PR unmergeable. I will sort all of that out and update the PR.

@revans2

Copy link
Copy Markdown
Contributor

@priyank5485 thanks for doing this. I think it is going to make the UI much more usable. Essentially giving us perma-links to a topology.

@wuchong

Copy link
Copy Markdown
Member

+1

In Alibaba, we implement our monitor system using topology name instead of id. And it is very useful , as users often resubmit topology several times , and they do not need to find the new topology page link.

But we should maintain backward compatibility. maybe we can deal with topology-id arg in function get-id-from-name

@harshach

Copy link
Copy Markdown
Contributor

@priyank5485 sorry for the delay. can you please upmerge this patch and open up another PR for 1.x-branch as well.

@priyank5485

Copy link
Copy Markdown
ContributorAuthor

@harshach@revans2 I have addressed the comments and raised a PR #1277 against the 1.x branch as I could not test my branch off of master due to another issue. Can you please review the PR against 1.x branch? I will port the same to master by updating this PR.

d2r pushed a commit to d2r/storm that referenced this pull request Oct 16, 2018
We are closing stale Pull Requests to make the list more manageable.
Please re-open any Pull Request that has been closed in error.
Closesapache#608Closesapache#639Closesapache#640Closesapache#648Closesapache#662Closesapache#668Closesapache#692Closesapache#705Closesapache#724Closesapache#728Closesapache#730Closesapache#753Closesapache#803Closesapache#854Closesapache#922Closesapache#986Closesapache#992Closesapache#1019Closesapache#1040Closesapache#1041Closesapache#1043Closesapache#1046Closesapache#1051Closesapache#1078Closesapache#1146Closesapache#1164Closesapache#1165Closesapache#1178Closesapache#1213Closesapache#1225Closesapache#1258Closesapache#1259Closesapache#1268Closesapache#1272Closesapache#1277Closesapache#1278Closesapache#1288Closesapache#1296Closesapache#1328Closesapache#1342Closesapache#1353Closesapache#1370Closesapache#1376Closesapache#1391Closesapache#1395Closesapache#1399Closesapache#1406Closesapache#1410Closesapache#1422Closesapache#1427Closesapache#1443Closesapache#1462Closesapache#1468Closesapache#1483Closesapache#1506Closesapache#1509Closesapache#1515Closesapache#1520Closesapache#1521Closesapache#1525Closesapache#1527Closesapache#1544Closesapache#1550Closesapache#1566Closesapache#1569Closesapache#1570Closesapache#1575Closesapache#1580Closesapache#1584Closesapache#1591Closesapache#1600Closesapache#1611Closesapache#1613Closesapache#1639Closesapache#1703Closesapache#1711Closesapache#1719Closesapache#1737Closesapache#1760Closesapache#1767Closesapache#1768Closesapache#1785Closesapache#1799Closesapache#1822Closesapache#1824Closesapache#1844Closesapache#1874Closesapache#1918Closesapache#1928Closesapache#1937Closesapache#1942Closesapache#1951Closesapache#1957Closesapache#1963Closesapache#1964Closesapache#1965Closesapache#1967Closesapache#1968Closesapache#1971Closesapache#1985Closesapache#1986Closesapache#1998Closesapache#2031Closesapache#2032Closesapache#2071Closesapache#2076Closesapache#2108Closesapache#2119Closesapache#2128Closesapache#2142Closesapache#2174Closesapache#2206Closesapache#2297Closesapache#2322Closesapache#2332Closesapache#2341Closesapache#2377Closesapache#2414Closesapache#2469
d2r pushed a commit to d2r/storm that referenced this pull request Oct 16, 2018
We are closing stale Pull Requests to make the list more manageable.
Please re-open any Pull Request that has been closed in error.
Closesapache#608Closesapache#639Closesapache#640Closesapache#648Closesapache#662Closesapache#668Closesapache#692Closesapache#705Closesapache#724Closesapache#728Closesapache#730Closesapache#753Closesapache#803Closesapache#854Closesapache#922Closesapache#986Closesapache#992Closesapache#1019Closesapache#1040Closesapache#1041Closesapache#1043Closesapache#1046Closesapache#1051Closesapache#1078Closesapache#1146Closesapache#1164Closesapache#1165Closesapache#1178Closesapache#1213Closesapache#1225Closesapache#1258Closesapache#1259Closesapache#1268Closesapache#1272Closesapache#1277Closesapache#1278Closesapache#1288Closesapache#1296Closesapache#1328Closesapache#1342Closesapache#1353Closesapache#1370Closesapache#1376Closesapache#1391Closesapache#1395Closesapache#1399Closesapache#1406Closesapache#1410Closesapache#1422Closesapache#1427Closesapache#1443Closesapache#1462Closesapache#1468Closesapache#1483Closesapache#1506Closesapache#1509Closesapache#1515Closesapache#1520Closesapache#1521Closesapache#1525Closesapache#1527Closesapache#1544Closesapache#1550Closesapache#1566Closesapache#1569Closesapache#1570Closesapache#1575Closesapache#1580Closesapache#1584Closesapache#1591Closesapache#1600Closesapache#1611Closesapache#1613Closesapache#1639Closesapache#1703Closesapache#1711Closesapache#1719Closesapache#1737Closesapache#1760Closesapache#1767Closesapache#1768Closesapache#1785Closesapache#1799Closesapache#1822Closesapache#1824Closesapache#1844Closesapache#1874Closesapache#1918Closesapache#1928Closesapache#1937Closesapache#1942Closesapache#1951Closesapache#1957Closesapache#1963Closesapache#1964Closesapache#1965Closesapache#1967Closesapache#1968Closesapache#1971Closesapache#1985Closesapache#1986Closesapache#1998Closesapache#2031Closesapache#2032Closesapache#2071Closesapache#2076Closesapache#2108Closesapache#2119Closesapache#2128Closesapache#2142Closesapache#2174Closesapache#2206Closesapache#2297Closesapache#2322Closesapache#2332Closesapache#2341Closesapache#2377Closesapache#2414Closesapache#2469
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@priyank5485@jerrypeng@revans2@harshach@Parth-Brahmbhatt@wuchong