anmolnar commented on code in PR #6632:
URL: https://github.com/apache/hbase/pull/6632#discussion_r1951514748
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java:
##########
@@ -65,9 +72,34 @@ public final class TableName implements
Comparable<TableName> {
public static final String VALID_USER_TABLE_REGEX = "(?:(?:(?:" +
VALID_NAMESPACE_REGEX + "\\"
+ NAMESPACE_DELIM + ")?)" + "(?:" + VALID_TABLE_QUALIFIER_REGEX + "))";
- /** The hbase:meta table's name. */
- public static final TableName META_TABLE_NAME =
- valueOf(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR, "meta");
+ /** The name of hbase meta table could either be hbase:meta_xxx or
'hbase:meta' otherwise.
+ * Config hbase.meta.table.suffix will govern the decision of adding suffix
to the habase:meta */
+ public static final TableName META_TABLE_NAME;
+ static {
+ Configuration conf = HBaseConfiguration.create();
+ META_TABLE_NAME = initializeHbaseMetaTableName(conf);
+ }
+
+ /* Visible for testing only */
+ @RestrictedApi(explanation = "Should only be called in tests", link = "",
+ allowedOnPath = ".*/src/test/.*")
+ public static TableName getDefaultNameOfMetaForReplica() {
+ return valueOf(NamespaceDescriptor.SYSTEM_NAMESPACE_NAME_STR, "meta");
+ }
+
+ public static TableName initializeHbaseMetaTableName(Configuration conf) {
+ String suffix_val = String.valueOf(conf.getStrings(
Review Comment:
Meta table suffix is just a string. I think this should be `conf.get(...)`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]