Apache9 commented on code in PR #6259: URL: https://github.com/apache/hbase/pull/6259#discussion_r1804919099
########## hbase-common/src/main/java/org/apache/hadoop/hbase/TableName.java: ########## @@ -260,6 +260,10 @@ public String getQualifierAsString() { return qualifierAsString; } + public String getMetricPrefixTableName() { Review Comment: TableName is IA.Public so we'd better not add new method unless you are sure it is useful for everyone. ########## hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/wal/MetricsWALSourceImpl.java: ########## @@ -88,7 +88,7 @@ public void incrementAppendSize(TableName tableName, long size) { if (tableAppendSizeCounter == null) { // Ideally putIfAbsent is atomic and we don't need a branch check but we still do it to avoid // expensive string construction for every append. - String metricsKey = String.format("%s.%s", tableName, APPEND_SIZE); + String metricsKey = String.format("%s.%s", tableName.getMetricPrefixTableName(), APPEND_SIZE); Review Comment: So the problem here is that, if we have ':' in th table name, it can not be displayed in jmx? But this is still a breaking change... do we have other ways to obtain the metrics beside jmx? Do these ways also require that there is no ':' in the metrics name? -- 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-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org