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
HBASE-24659 Calculate FIXED_OVERHEAD automatically #2018
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 |
---|---|---|
|
@@ -8405,12 +8405,7 @@ private static List<Cell> sort(List<Cell> cells, final CellComparator comparator | |
return cells; | ||
} | ||
|
||
public static final long FIXED_OVERHEAD = ClassSize.align( | ||
ClassSize.OBJECT + | ||
56 * ClassSize.REFERENCE + | ||
3 * Bytes.SIZEOF_INT + | ||
14 * Bytes.SIZEOF_LONG + | ||
3 * Bytes.SIZEOF_BOOLEAN); | ||
public static final long FIXED_OVERHEAD = ClassSize.estimateBase(HRegion.class, false); | ||
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. Does ClassSize come up w/ same general numbers as old manual technique. It does deep size rather than shallow? 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. I think ClassSize.estimateBase only calculate shallow size 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. I thought it critical it did deep size? Do you get the same numbers roughly? |
||
|
||
// woefully out of date - currently missing: | ||
// 1 x HashMap - coprocessorServiceHandlers | ||
|
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.
Or, sorry, yeah, FIXED_OVERHEAD is 'this' classes size; i.e. the shallow size (I think).
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.
I went back through history of ClassSize... its so old.