-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28845 table level wal appendSize and replication source metrics… #6259
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the late reply, I tried jmxterm tool, found we could get this metric correctly 😂 ... |
||
| perTableAppendSize.putIfAbsent(tableName, | ||
| getMetricsRegistry().newCounter(metricsKey, APPEND_SIZE_DESC, 0L)); | ||
| tableAppendSizeCounter = perTableAppendSize.get(tableName); | ||
|
|
@@ -106,7 +106,8 @@ public void incrementAppendCount(TableName tableName) { | |
| appendCount.incr(); | ||
| MutableFastCounter tableAppendCounter = perTableAppendCount.get(tableName); | ||
| if (tableAppendCounter == null) { | ||
| String metricsKey = String.format("%s.%s", tableName, APPEND_COUNT); | ||
| String metricsKey = | ||
| String.format("%s.%s", tableName.getMetricPrefixTableName(), APPEND_COUNT); | ||
| perTableAppendCount.putIfAbsent(tableName, | ||
| getMetricsRegistry().newCounter(metricsKey, APPEND_COUNT_DESC, 0L)); | ||
| tableAppendCounter = perTableAppendCount.get(tableName); | ||
|
|
||
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.
TableName is IA.Public so we'd better not add new method unless you are sure it is useful for everyone.