-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-30242 Add Region server level HFile Compression Metrics #8389
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?
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 |
|---|---|---|
|
|
@@ -533,6 +533,20 @@ public long getStoreFileSize() { | |
| return aggregate.storeFileSize; | ||
| } | ||
|
|
||
| @Override | ||
| public long getStoreFileUncompressedSize() { | ||
| return aggregate.storeFileUncompressedSize; | ||
| } | ||
|
|
||
| @Override | ||
| public double getStoreFileCompressionRatio() { | ||
| long uncompressed = aggregate.storeFileUncompressedSize; | ||
|
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.
|
||
| if (uncompressed == 0) { | ||
|
apurtell marked this conversation as resolved.
|
||
| return 0.0; | ||
| } | ||
| return (double) uncompressed / aggregate.storeFileSize; | ||
| } | ||
|
|
||
| @Override | ||
| public double getStoreFileSizeGrowthRate() { | ||
| return aggregate.storeFileSizeGrowthRate; | ||
|
|
@@ -783,6 +797,7 @@ private static final class RegionMetricAggregate { | |
| private long onHeapMemstoreSize = 0; | ||
| private long offHeapMemstoreSize = 0; | ||
| private long storeFileSize = 0; | ||
| private long storeFileUncompressedSize = 0; | ||
| private double storeFileSizeGrowthRate = 0; | ||
| private long maxStoreFileCount = 0; | ||
| private long maxStoreFileAge = 0; | ||
|
|
@@ -979,6 +994,7 @@ private StoreFileStats aggregateStores(List<HStore> stores) { | |
| onHeapMemstoreSize += store.getMemStoreSize().getHeapSize(); | ||
| offHeapMemstoreSize += store.getMemStoreSize().getOffHeapSize(); | ||
| storeFileSize += store.getStorefilesSize(); | ||
| storeFileUncompressedSize += store.getStoreSizeUncompressed(); | ||
| maxStoreFileCount = Math.max(maxStoreFileCount, store.getStorefilesCount()); | ||
|
|
||
| maxStoreFileAge = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,16 @@ public long getStoreFileSize() { | |
| return 1900; | ||
| } | ||
|
|
||
| @Override | ||
|
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. This verifies source export from a fixed wrapper stub, but it does not exercise Using stores with different individual ratios would also verify that this remains a weighted aggregate rather than an average of per-store ratios. Basically +1 to Andrew's comment. |
||
| public long getStoreFileUncompressedSize() { | ||
| return 3800; | ||
| } | ||
|
|
||
| @Override | ||
| public double getStoreFileCompressionRatio() { | ||
| return 2; | ||
| } | ||
|
|
||
| @Override | ||
| public double getStoreFileSizeGrowthRate() { | ||
| return 50.0; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.