New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STORM-205. Add REST API to Storm UI. #101
Conversation
I think this is a pretty good start. Switching over to a REST API will enable external systems to do monitoring, visualizations, etc. However, there are a couple of issues that need to be addressed: Main Screen:
Topology Detail:
In
|
Thanks for the feedback @ptgoetz. I will fix the above mentioned issues. |
fixed topology stats and bolt stats.
unnecessary file
@@ -48,92 +48,6 @@ | |||
(map #(.get_stats ^ExecutorSummary %)) | |||
(filter not-nil?))) | |||
|
|||
(def tips |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the help text is now replicated possibly to several different HTML templates. Is there a way to consolidate these so that changes only need to be made in one place in the future, or is that really difficult to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this since I removed all html rendering from core.clj this made it inconvenient. I will look into mustache templates if it this can be in one place.
I get a weird error when trying to compile this:
I am not sure why I need to access a java trust store just to compile this code. Any idea what might be wrong? |
d2r thats werid. I just did a rebase against master and ran the build . It went through fine with all the tests passing |
I was able to build this as well without issue. I'm testing now in a clustered environment. |
Looks fine to me. +1 |
Tested api methods and looks good. |
+1 At some point in the 0.9.x line a regression was introduced such that the complete latency always displays as 0. I see the same behavior here. If that can be fixed as part of this pull request, that would be great. If not, then we should create a JIRA for it. I would like to see that fixed for the next release. |
@ptgoetz I remember fixing that let me check again. |
@ptgoetz Added complete-latency to the stats. Can you please try it once. |
added complete-latencies to the topology-stats
+1 |
I agree with d2r that I would like to see the tool tips centralized if possible, I would also like to see a version on the REST apis, something like api/v1/... And it would be nice to have some documentation on the APIs somewhere. |
I am fine with doing documentation and cleanup later. |
topology-stats changed /api to /api/v1
@harshach it looks like this commit reverts the previous commit to fix the complete latency metrics... Can you double check? |
undid the complete-latencies fix with last commit added back
fixed typo.
Never mind. Rebooted and did not see the issue again. |
{ "stormVersion" (read-storm-version) | ||
"nimbusUptime" (pretty-uptime-sec (.get_nimbus_uptime_secs summ)) | ||
"supervisors" (count sups) | ||
"topologies" "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like topologies is always blank with /api/v1/cluster/summary
@d2r Thanks for catching that. Topologies info can be retried from /api/v1/topology/summary . I am not sure about including it as part of cluster/summary. If it makes sense I'll add there otherwise I'll remove the "topologies" element from the response. |
removed empty topologies element from cluster-summary.
:title (:spout-failed tips)}}] | ||
(for [k (concat times [":all-time"]) | ||
:let [disp ((display-map k) k)]] | ||
[(link-to (if (= k window) {:class "red"} {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The selected time window in the UI no longer appears as red. This could be important since the user would not know whether a window applied to the metrics without looking at the URL.
It will be great to have an API with JSON responses coming back. I would like to resolve at least the issue with the errors table on the component page, and then I will be +1. The other issues can go in a follow-on JIRA. |
@d2r component errors page is working fine. I guess its my template naming thats not good. There is div "error" which get update if the API responded with any error and it doesn't return any proper json. |
This is the rendered HTML I see:
It looks like 9 rows with two blank cells each, and one row without any cells. I see this on Firefox and Safari on OSX. It seems to know there are errors there, but they are not getting populated for some reason... |
Correction: It is 10 rows of two blank cells each. |
@d2r thanks for the info. I am testing few things I'll update the PR with the fix. |
I know what it is. The errors are doubly-nested in lists. So you have |
yeah error is in returning the json here https://github.com/harshach/incubator-storm/blob/ui-rest-new/storm-core/src/clj/backtype/storm/ui/core.clj#L514 . updating PR with fix. |
Fixed component errors response. Changed naming of template ids and div.
@d2r can you please check the latest update. I've tested on a small cluster here is a screenshot |
+1 that fixed it. |
looks good to me +1 |
Thanks for the feedback on this. Working on documentation and other recommendations that made earlier will push those as part of new JIRA. |
Can we get metrics for a supplied time window? |
@Pradeepbadiger Yes you can pass a window param (in secs) to |
First off, thanks very much for this guys, having a RESTful JSON API for Storm is awesome. Just curious, is JSON-P supported by the API endpoints? This would allow users (like myself) to build something like elasticsearch-head and avoid issues with same-origin policy in browsers. |
@msukmanowsky right now all that api returns is a json response. Could you please file a jira for jsonp support. |
@harshach Strange, i don't see any spout-stats section or bolt-stats-section in topology page. And thus i can't follow into component page or logviewer page. Am i missing something ? |
@Gvain I just downloaded apache-storm-0.9.2-incubating and ran a wordcount topology. Here is my UI |
@Gvain Incase if you not already done it can you clear the browser cache. |
There seems to javascript syntax error : jquery.tablesorter.min.js |
@harshach I am using chrome, and latest storm from master branch, so, STORM-370 has already merged in. it should not related to it as my problem page is topology page while STORM-370 is component page. I also cleared my chrome cache, it doesn't help. My ui topology page looks like this: |
jquery.tablesorter.min.js issue. |
@shell0dh Yeap, that's it Thanks a lot. |
@shell0dh , Thanks for your remind. I will try it. |
Fixed the incorrect configs
all of the above methods returns json response.