Uh oh!
There was an error while loading. Please reload this page.
HBASE-26714 Introduce path configuration for system coprocessors - #4069
Conversation
Apache-HBase
commented
Jan 27, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 27, 2022
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 27, 2022
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 27, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 27, 2022
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 27, 2022
💔 -1 overall
This message was automatically generated. |
| overridePriority = Integer.parseInt(classNameToken[1]); | ||
| hasPriorityOverride = true; | ||
| } | ||
| if (classNameToken.length == 3) { |
There was a problem hiding this comment.
Shouldn't we set overridePriority here as well? Or is it supposed to be ignored and use SYSTEM always? And what if the config definition is invalid, say CLASS_NAME|PATH? Should we perform some validation?
There was a problem hiding this comment.
I missed that and will fix , thanks for pointing that out
Apache-HBase
commented
Jan 28, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 28, 2022
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 28, 2022
💔 -1 overall
This message was automatically generated. |
taklwu
commented
Jan 28, 2022
i need to check why |
cbaenziger
left a comment
There was a problem hiding this comment.
Thank you for writing this. I saw two nits about a log message and a comment. Looks good to my novice eyes otherwise. Your buildCoprocessorJar() is a very neat way to create a JAR for tests in HBase; thank you for teaching me.
| cl = CoprocessorClassLoader.getClassLoader(path, this.getClass().getClassLoader(), | ||
| pathPrefix, conf); | ||
| } catch (IOException ioe) { | ||
| // if system coprocessors cannot be obtained, we also about the region server |
There was a problem hiding this comment.
I think this should read, we also abort
| pathPrefix, conf); | ||
| } catch (IOException ioe) { | ||
| // if system coprocessors cannot be obtained, we also about the region server | ||
| LOG.error("Cannot fetch external System coprocessor class {} with path {}", className, |
Apache-HBase
commented
Jan 28, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 29, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 29, 2022
🎊 +1 overall
This message was automatically generated. |
taklwu
commented
Jan 29, 2022
In fact, I also learnt from the code that |
Apache-HBase
commented
Jan 29, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 29, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Jan 29, 2022
🎊 +1 overall
This message was automatically generated. |
ankitsinghal
left a comment
There was a problem hiding this comment.
+1 lgtm, left comments with few nits
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (hasPath) { | ||
| String pathPrefix = UUID.randomUUID().toString(); | ||
| try { | ||
| cl = CoprocessorClassLoader.getClassLoader(path, this.getClass().getClassLoader(), | ||
| pathPrefix, conf); | ||
| } catch (IOException ioe) { | ||
| // if system coprocessors cannot be obtained, we also about the region server | ||
| LOG.error("Cannot fetch external System coprocessor class {} with path {}", className, | ||
| path); | ||
| abortServer(className, ioe); |
There was a problem hiding this comment.
Can we move this logic under the original try{} catch{}, so that we don't have multiple condition for "abortServer(className, ioe);"
There was a problem hiding this comment.
I was trying to separate them and throws with different message, so, I think merging them may confuse operators and they won't know it was caused by loading system coprocessor remotely
There was a problem hiding this comment.
LOG.error("Cannot fetch external System coprocessor class {} with path {}", className, path);
The error message doesn't seem correct as the class will be fetched(or loaded) in the next step. And I also still believe that as the IOException should already be covering the reason if the path is incorrect, we should merge this try-catch with the other to avoid the redundant code.
There was a problem hiding this comment.
I agreed that the IOException will cover the right stacktrace, and just to clarify that CoprocessorClassLoader.getClassLoader internally will first check if the given path exist before actually loading the classname from the jar, that's why I split them into two blocks originally and want to tell the operators from logs that the jar file does not exist and it's not only about give coprocessor class does not exist
There was a problem hiding this comment.
c49b2c6 has merged the block into a single try-catch, and thanks for your explanation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
taklwu
commented
Feb 3, 2022
squashed and trying to trigger the precommit tests |
Apache-HBase
commented
Feb 3, 2022
🎊 +1 overall
This message was automatically generated. |
ankitsinghal
commented
Feb 3, 2022
+1 and Thanks for taking care of the review comments. |
Apache-HBase
commented
Feb 3, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 4, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 4, 2022
🎊 +1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 4, 2022
💔 -1 overall
This message was automatically generated. |
2 similar comments
Apache-HBase
commented
Feb 4, 2022
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 4, 2022
💔 -1 overall
This message was automatically generated. |
No description provided.