You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/01/27 10:12:25 UTC
[GitHub] [hbase] wchevreuil commented on a change in pull request #4069: HBASE-26714 Introduce path configuration for system coprocessors
wchevreuil commented on a change in pull request #4069:
URL: https://github.com/apache/hbase/pull/4069#discussion_r793448013
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/CoprocessorHost.java
##########
@@ -144,21 +144,44 @@ protected void loadSystemCoprocessors(Configuration conf, String confKey) {
int currentSystemPriority = Coprocessor.PRIORITY_SYSTEM;
for (String className : defaultCPClasses) {
- String[] classNameAndPriority = className.split("\\|");
+ // After HBASE-23710 and HBASE-26714 when configuring for system coprocessor, we accept
+ // an optional format of className|priority|path
+ String[] classNameToken = className.split("\\|");
boolean hasPriorityOverride = false;
- className = classNameAndPriority[0];
+ boolean hasPath = false;
+ className = classNameToken[0];
int overridePriority = Coprocessor.PRIORITY_SYSTEM;
- if (classNameAndPriority.length > 1){
- overridePriority = Integer.parseInt(classNameAndPriority[1]);
+ Path path = null;
+ if (classNameToken.length == 2) {
+ overridePriority = Integer.parseInt(classNameToken[1]);
hasPriorityOverride = true;
}
+ if (classNameToken.length == 3) {
Review comment:
Shouldn't we set `overridePriority` here as well? Or is it supposed to be ignored and user `SYSTEM`? And what if the config definition is invalid, say `CLASS_NAME|PATH`? Should we perform some validation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org