Uh oh!
There was an error while loading. Please reload this page.
STORM-1129: Use topology name instead of id in UI calls. - #854
STORM-1129: Use topology name instead of id in UI calls.#854priyank5485 wants to merge 1 commit into
Conversation
jerrypeng
commented
Nov 4, 2015
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
commented
Nov 4, 2015
@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
commented
Nov 4, 2015
@jerrypeng We have a check and it throws the following exception. Exception in thread "main" java.lang.RuntimeException: Topology with name @revans2 Thanks for chiming in. |
harshach
commented
Nov 4, 2015
@jerrypeng topology names are unique |
Parth-Brahmbhatt
commented
Nov 4, 2015
+1. |
jerrypeng
commented
Nov 4, 2015
thanks for the explanation and clarification everybody |
revans2
commented
Nov 4, 2015
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. |
There was a problem hiding this comment.
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
commented
Nov 4, 2015
@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
commented
Nov 4, 2015
I agree with @revans2 , lets maintain backward compatibility. |
priyank5485
commented
Nov 5, 2015
@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
commented
Nov 5, 2015
@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
commented
Nov 6, 2015
+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 |
harshach
commented
Mar 13, 2016
@priyank5485 sorry for the delay. can you please upmerge this patch and open up another PR for 1.x-branch as well. |
priyank5485
commented
Mar 30, 2016
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
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
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.