Kota-SH commented on code in PR #7923:
URL: https://github.com/apache/hbase/pull/7923#discussion_r2932840665
##########
hbase-common/src/test/java/org/apache/hadoop/hbase/TestTableName.java:
##########
@@ -164,4 +165,27 @@ private TableName validateNames(TableName expected, Names
names) {
assertArrayEquals(expected.getNamespace(), names.nsb);
return expected;
}
+
+ @Test
+ public void testValidMetaTableSuffix() {
+ String[] validSuffixes = { "REPL1", "123", "123abc" };
+ for (String suffix : validSuffixes) {
+ Configuration conf = HBaseConfiguration.create();
+ conf.set(HConstants.HBASE_META_TABLE_SUFFIX, suffix);
+ TableName metaTableName = TableName.initializeHbaseMetaTableName(conf);
+ assertEquals("hbase:meta_" + suffix, metaTableName.getNameAsString());
+ }
+ }
+
+ @Test
+ public void testInvalidMetaTableSuffix() {
+ String[] invalidSuffixes = { "test_1", "test-1", "test.1", "test 1",
"_test",
+ "-test", ".test", "has!special", " " };
Review Comment:
Added it, thanks for pointing out @sharmaar12
--
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]