-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil #7416
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
[ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil #7416
Conversation
| conf.setBoolean("hbase.master.ui.fragmentation.enabled", true); | ||
| Map<String, Integer> fragmentationInfo = MasterStatusUtil.getFragmentationInfo(master, conf); | ||
| assertNotNull(fragmentationInfo); | ||
| assertEquals(1, fragmentationInfo.size()); |
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.
For me this locally was always 1 but in the nightly build it was 11:
https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/1359/testReport/junit/org.apache.hadoop.hbase.master.http/TestMasterStatusUtil/health_checks___yetus_jdk17_hadoop3_backwards_compatibility_checks___testGetFragmentationInfoTurnedOn/
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.
Is this expected or something is broken?
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.
Thanks, very good question.
So TestMasterStatusUtil.getFragmentationInfo() was originally part of MasterStatusServlet and I migrated it to the static util class under #6875 and added the unit tests.
Locally I got different results than in the master build but I thought this can be OK because the code invokes FSUtils.getTableFragmentation() which does:
Runs through the HBase rootdir and checks how many stores for each table have more than one file in them. Checks -ROOT- and hbase:meta too. The total percentage across all tables is stored under the special key "-TOTAL-".
As I understand, this can be different in many cases so I just end up checking here that the map is not empty.
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.
Got it.
|
Hi @PDavid is this an addendum? you seem to be using an existing jira title here. Also is this the right fix, may be checkon what should be the expected assertion? |
Hi @NihalJain,
To be completely honest I'm having trouble finding out the right value to expect in the assertion. Locally was always 1 but in the nightly build it was 11: I also thought about checking that the map is not empty. 🤔 |
TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build
…ationInfoTurnedOn
bba011e to
bcd72e1
Compare
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.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
[ADDENDUM] TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build.