-
Notifications
You must be signed in to change notification settings - Fork 1k
PHOENIX-7729: Identify top N slowest parallel scans for metrics reporting #2337
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
… memstore and block count read from FS
| <activation> | ||
| <property> | ||
| <name>!hbase.profile</name> | ||
| <name>hbase.profile</name> |
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.
Revert all the changes in this file before merge.
| scan.setScanMetricsEnabled(true); | ||
| scan.setEnableScanMetricsByRegion(isScanMetricsByRegionEnabled); |
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.
These 2 calls as a side effect of the getter method is not a good pattern.
| globalScanMetrics.get(ScanMetrics.MILLIS_BETWEEN_NEXTS_METRIC_NAME); | ||
| } | ||
|
|
||
| private MetricType getMetricType(String metricName) { |
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.
How about moving this to MetricType enum? You could even add the HBase metric name to the enum constructor and create a lookup table dynamically by introspecting the enums with non-null HBase metric name. You can even have static getters to access the metric names and drive other parts of the code that have a long list of getters and setters to execute the logic reflectively instead of statically. A getter on the enum to access the hbase metric name can also help access the names via the enum for consistency.
JIRA: PHOENIX-7729
phoenix.slowest.scan.metrics.countandphoenix.scan.metrics.by.region.enabled.phoenix.slowest.scan.metrics.countspecifies the value of N for capturing metrics for top N slowest scan metrics. The value should be > 0 to enable capturing top N slowest scan metrics.phoenix.scan.metrics.by.region.enabledspecifies whether to capture region hash and RS name along with HBase scan metrics. Leverages HBASE-29233.SlowestScanMetricsIT.