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
HBASE-25469 Add detailed RIT info in JSON format for consumption as metrics #3535
Conversation
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@@ -659,6 +660,7 @@ protected RSRpcServices createRpcServices() throws IOException { | |||
@Override | |||
protected void configureInfoServer() { | |||
infoServer.addUnprivilegedServlet("master-status", "/master-status", MasterStatusServlet.class); | |||
infoServer.addPrivilegedServlet("rits", "/rits", RitServlet.class); |
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.
Nit: Let's call it "/rit".
Not a big deal, but other paths are not in the plural form.
} | ||
|
||
if (rits.isEmpty()) { | ||
out.write("There are currently no regions in transition."); |
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.
This is not valid JSON.
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.
is it okay to return an empty map then?
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.
Is it not better to consolidate the code under rits.jsp?format=json
? It already supports text and html, think you just need to add another branch?
@bharathv I considered consolidating, but mainly wrote it this way so that 1) the url isn't so complex, and 2) the code is not dependent on this page/the complex url (we can also attach the servlet elsewhere if we want). |
🎊 +1 overall
This message was automatically generated. |
The problem is that the two places can now diverge. If someone is not familiar with the other page, they just update one of them. As an operator it is now confusing whether to use /rit or /rit.jsp or both or how they differ apart from the output type is not obvious. Is it difficult to clean up rit.jsp or move rit.jsp logic into /rit servlet (and add a redirect in branch-2) ? |
@bharathv there already are multiple places where RIT info can be found: the main |
actually, I think it makes more sense to link |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
I'm not convinced by the explanation. I can see how /master-status has a summary in the footer and is a bit different from the other pages but it is usually a common pattern to do something like /rits?type=html /rits?type=json /rits?type=txt etc and all are served by the backing page (especially when they are serving the same information presented in different ways). Not a big deal though, don't want to block the progress here. I'm ok if @apurtell has already +1ed the patch. |
@bharathv ok, I moved the JSON logic into |
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.
Thanks. Did you test it locally with some inputs?
@@ -69,24 +75,29 @@ | |||
<div class="page-header"> | |||
<a href="/rits.jsp?format=txt&filter=region&table=<%=table%>&state=<%=state%>" class="btn btn-primary">Regions in text format</a> | |||
<a href="/rits.jsp?format=txt&filter=procedure&table=<%=table%>&state=<%=state%>" class="btn btn-info">Procedures in text format</a> | |||
<a href="/rits.jsp?format=json" class="btn btn-info">RIT info as JSON</a> |
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.
Add table and state filters (=null) for completeness?
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
78e97fd
to
cc426dc
Compare
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
No description provided.