-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29729 Add per-region table descriptor hash to regionServer JMX Metrics #7481
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?
HBASE-29729 Add per-region table descriptor hash to regionServer JMX Metrics #7481
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapperImpl.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
...e-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
Outdated
Show resolved
Hide resolved
...e-hadoop-compat/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapper.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapperImpl.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionWrapperImpl.java
Outdated
Show resolved
Hide resolved
...t/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionWrapperTableDescriptorHash.java
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| crc32.update(byteBuffer); | ||
| return Long.toHexString(crc32.getValue()); | ||
| } catch (Exception e) { | ||
| Logger log = LoggerFactory.getLogger(TableDescriptor.class); |
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.
Can we move this log variable to the class level to be consistent?
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
Going to kick off a rebuild. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Kota-SH
left a comment
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.
LGTM
When table descriptors are modified (e.g., changing compression settings, TTL, or column family configurations), region servers need to reopen regions to pick up these changes. However, there's currently no reliable way to detect which regions are running with stale table descriptors versus the current configuration. This makes it difficult to verify that descriptor changes have propagated correctly across all regions, increasing the risk of configuration drift and making deployment automation more challenging.
This PR adds a tableDescriptorHash field to the per-region JMX metrics exposed by region servers. The hash is a SHA-256 digest of the serialized
TableDescriptorprotobuf, computed once when the region is opened and exposed through theMetricsRegionWrapperinterface. Regions opened with identical table descriptors will produce identical hashes, while any configuration change (compression, TTL, block size, etc.) will produce a different hash. This enables monitoring systems and deployment automation to quickly identify regions that need reopening after table descriptor changes, without parsing and comparing complex nested configuration objects.