-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29691: Change TableName.META_TABLE_NAME from being a global static #7558
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
base: master
Are you sure you want to change the base?
Conversation
…tic: org.apache.hadoop.hbase
…tic: org.apache.hadoop.hbase.client
…tic: org.apache.hadoop.hbase.master
…tic: org.apache.hadoop.hbase.regionserver
…tic: fix spotless
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Apache9
left a comment
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 do not think this is the correct way, at least you should not let clients config meta table name right? They should ask the meta table name from bootstrap node.
Theoretically, we can even support changing meta table name at runtime, clients and region servers can ask meta table name from master when they hit table not found exception when accessing meta.
And if we think this is a bit difficult to implement, and maybe there is no need to change meta table name after initialization, then maybe we can introduce a config to set meta table name when bootstraping a cluster, then we record this name in master local region or on HDFS directly. But anyway, clients and region servers still need to ask for the meta table name from master, not from configuration. But they just do not need to deal with meta table name change when running.
Thanks.
| if (instance == null) { | ||
| synchronized (MetaTableName.class) { | ||
| if (instance == null) { | ||
| instance = initializeHbaseMetaTableName(HBaseConfiguration.create()); |
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 do not think this is a good practise, as this is still static, what if a client wants to connect different read replica clusters? And it will difficult to write UTs when you want to set up two clusters with different meta table names...
Jira: https://issues.apache.org/jira/browse/HBASE-29691