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-24547 : Thrift support for HBASE-23941 (Operator support for get_slowlog_responses API) #1892
Conversation
…t_slowlog_responses API)
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
We need some tests?
@@ -470,6 +475,7 @@ struct TLogQueryFilter { | |||
4: optional string userName | |||
5: optional i32 limit = 10 | |||
6: optional TLogType logType = 1 | |||
7: optional TFilterByOperator filterByOperator = 2 |
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.
Use OR rather than the enum value?
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
yup, added simple testing in existing test. |
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.
+1 once the last comment is fixed.. Feel free to carry the +1.
@@ -1767,6 +1769,12 @@ public void testSlowLogResponses() throws Exception { | |||
clearedResponses.forEach(Assert::assertTrue); | |||
TLogQueryFilter tLogQueryFilter = new TLogQueryFilter(); | |||
tLogQueryFilter.setLimit(15); | |||
Assert.assertEquals(tLogQueryFilter.getFilterByOperator(), TFilterByOperator.OR); | |||
LogQueryFilter logQueryFilter = ThriftUtilities.getSlowLogQueryFromThrift(tLogQueryFilter); |
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.
Umm, if we came this far, why not make an RPC and validate the result set too? :-)
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.
Ah I see, yes that is quite valid point :)
However, the issue with testing this way is: For our case, we don't have any Add/Update API, we just have Get API, and the event that trigger Add event is something not in client test's control (only at RpcServer level, we have control to identify if an RPC call was slow/large by nature).
…t_slowlog_responses API) (#1892) Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
…t_slowlog_responses API) (#1892) Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
Thanks @bharathv for the review. |
…t_slowlog_responses API) (apache#1892) Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
No description provided.