-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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-27938 - PE load any custom implementation of tests at runtime #5307
Conversation
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 @gvprathyusha6, could you please also update printUsage with this new option?
protected static void printUsage(final String shortName, final String message) {
💔 -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. |
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.
Please explain how this should be used;
Add command/option explanation in the printUsage method;
We should encourage custom tests to be contributed back as part of the PerformanceEvaluation tool.
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Instead of Command name we need to give the classname of Test impl and it should work as is.
That is true, but if the custom test impl is very much usecase specific and isnt generic enough to be contributed back we wont be able to utilise the framework code completely, because as of now it mandates to have a compile time dependency of the implemented test class. |
So we need to explicitly say that in the printUsage. I couldn't get that by the
What I meant was to put some notes on the description for this generic command option. Something like "Please consider contribute back this custom command into a builtin PE command for the benefit of the community". |
Got it, how about we update
And add a section for Class just below Commad:
Seems inline with current documentation standard also to me |
Yeah, that would be good. Thanks! |
6a7fe01
to
fc77191
Compare
💔 -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.
LGTM, but need to fix the spotless reported issue before I can merge this, @gvprathyusha6 .
@@ -3089,7 +3115,20 @@ public int run(String[] args) throws Exception { | |||
} | |||
|
|||
private static boolean isCommandClass(String cmd) { | |||
return COMMANDS.containsKey(cmd); | |||
return !COMMANDS.containsKey(cmd) ? isCustomTestClass(cmd) : true; |
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.
return COMMANDS.containsKey(cmd) || isCustomTestClass(cmd);
Could you please provide a UT or add an example in hbase-examples to show how to make use of this feature? Thanks. |
fc77191
to
986f71b
Compare
🎊 +1 overall
This message was automatically generated. |
@@ -2308,7 +2316,7 @@ protected byte[] generateRow(final int i) { | |||
} | |||
|
|||
@Override | |||
boolean testRow(final int i, final long startTime) throws IOException { | |||
protected boolean testRow(final int i, final long startTime) throws IOException { |
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.
Why change this to protected?
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.
to override this in impl class, so that we can customise row format. If the custom test knows the dataset, it would be beneficial to repro any specific scenario, like if I have the rowkey similar to what tsdb puts, I can create scan load on particular dataset and write load on another and try to get closer to prod scenarios
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.
But the methods in TestBase class are all package private? Even if you change this to protected, you can not inherit this class in other package because you can not call the constructor?
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 was managing them by using the same package name, removing it
05b01ea
to
29af40a
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. |
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.
Please try fixing the checkstyle issue, just line length.
I have no other concerns.
29af40a
to
13d3715
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. |
…test class and properties
13d3715
to
94d76fe
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. |
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
@gvprathyusha6 could you also create branch-2 PR? we can merge both of them together and backport as required. |
) (#5899) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
) (#5899) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
) (#5899) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ache#5307) Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
Enable PE to load any custom implementation of tests at runtime