-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix bug where the configuration of the hbaseRootdir at the role level is ignored #584
Fix bug where the configuration of the hbaseRootdir at the role level is ignored #584
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.
LGTM
I'm a bit confused by the comment. That seems to indicate that it's not required by the RegionServer? |
The master apparently tells the RegionServers where the root dir is located. I have not checked this assumption in the code but I tested it: If I set different root dirs for the roles ... $ git diff
diff --git a/tests/templates/kuttl/smoke/30-install-hbase.yaml.j2 b/tests/templates/kuttl/smoke/30-install-hbase.yaml.j2
index ac1bed8..ea5d883 100644
--- a/tests/templates/kuttl/smoke/30-install-hbase.yaml.j2
+++ b/tests/templates/kuttl/smoke/30-install-hbase.yaml.j2
@@ -21,6 +21,7 @@ spec:
{% endif %}
masters:
config:
+ hbaseRootdir: /rtmaster
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
roleGroups:
@@ -32,6 +33,7 @@ spec:
replicas: 2
regionServers:
config:
+ hbaseRootdir: /rtregion
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
roleGroups:
@@ -43,6 +45,7 @@ spec:
replicas: 2
restServers:
config:
+ hbaseRootdir: /rtrest
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
roleGroups: ... then the one set for the master is effective: $ bin/hdfs dfs -fs hdfs://test-hdfs/ -ls /
Found 1 items
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster
$ bin/hdfs dfs -fs hdfs://test-hdfs/ -ls /rtmaster
Found 12 items
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/.hbck
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/.tmp
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/MasterData
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/WALs
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:10 /rtmaster/archive
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/corrupt
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:01 /rtmaster/data
-rw-r--r-- 3 stackable supergroup 42 2024-11-15 11:00 /rtmaster/hbase.id
-rw-r--r-- 3 stackable supergroup 7 2024-11-15 11:00 /rtmaster/hbase.version
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/mobdir
drwxr-xr-x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/oldWALs
drwx--x--x - stackable supergroup 0 2024-11-15 11:00 /rtmaster/staging |
To add to this, we (or I?) decided to still set the |
Description
The problem was defaulting in the product config callbacks like:
If the
hbaseRootdir
was only set on the role, we defaulted the rolegroup toHBASE_ROOT_DIR_DEFAULT
("/hbase"), which during merging overrode the value set on the role. The solution here is to remove the defaulting and it works.One problem remained, if
hbaseRootdir
was not set at all, there was no default set anymore. The product config did not add the default due to the field being marked as not required.In order to keep the defaulting behavior as is and not mess with existing defaulted installation, the default for
hbase.root.dir
in the product config was changed to "/hbase" and the field marked as required (on all roles).The docs state though:
So i think we can only use it on the regionservers? Ping @lfrancke
Edit: Lars would bet its at least required in the masters, so i would keep it as is (required in all roles in the product config)
Definition of Done Checklist
Author
Reviewer
Acceptance