-
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. |
TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
* HBASE-29223 Migrate Master Status Jamon page back to JSP (#6875) The JSP code is equivalent to the Jamon code, just changed the syntax back to JSP. Request attributes are used to transfer data between JSP pages. Tried to preserve the code as much as possible but did some changes: Sub-templates were usually extracted to separate JSP file (and included with `<jsp:include`), in some case it was extracted as Java method. Extracted some sections from master page to separate JSP pages: - Software Attributes - Warnings Extracted the long JavaScript from the master page which executes on page load to separate JS file. Extracted some frequently used static methods to a new util class: `MasterStatusUtil`. Also added unit tests for the static methods in `MasterStatusUtil`. Changed the Master Status page back to `/master.jsp` again. Now made sure that `/master-status` redirects to `/master.jsp`. Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit be40011) * HBASE-29223 spotless fix * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
* HBASE-29223 Migrate Master Status Jamon page back to JSP (#6875) The JSP code is equivalent to the Jamon code, just changed the syntax back to JSP. Request attributes are used to transfer data between JSP pages. Tried to preserve the code as much as possible but did some changes: Sub-templates were usually extracted to separate JSP file (and included with `<jsp:include`), in some case it was extracted as Java method. Extracted some sections from master page to separate JSP pages: - Software Attributes - Warnings Extracted the long JavaScript from the master page which executes on page load to separate JS file. Extracted some frequently used static methods to a new util class: `MasterStatusUtil`. Also added unit tests for the static methods in `MasterStatusUtil`. Changed the Master Status page back to `/master.jsp` again. Now made sure that `/master-status` redirects to `/master.jsp`. Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit be40011) * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
apache#7478) * HBASE-29223 Migrate Master Status Jamon page back to JSP (apache#6875) The JSP code is equivalent to the Jamon code, just changed the syntax back to JSP. Request attributes are used to transfer data between JSP pages. Tried to preserve the code as much as possible but did some changes: Sub-templates were usually extracted to separate JSP file (and included with `<jsp:include`), in some case it was extracted as Java method. Extracted some sections from master page to separate JSP pages: - Software Attributes - Warnings Extracted the long JavaScript from the master page which executes on page load to separate JS file. Extracted some frequently used static methods to a new util class: `MasterStatusUtil`. Also added unit tests for the static methods in `MasterStatusUtil`. Changed the Master Status page back to `/master.jsp` again. Now made sure that `/master-status` redirects to `/master.jsp`. Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit be40011) * HBASE-29223 spotless fix * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (apache#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f) (cherry picked from commit d481a46)
* HBASE-29531 Migrate RegionServer Status Jamon page back to JSP (#7371) This is the 2/3 step of the Jamon to JSP migration: the Region Server Status page. Did the migration the same way as for the Master Status page: #6875 Migrated the Jamon code to JSP as close as possible. Extracted the duplicated `formatZKString` method to new java class: ZKStringFormatter and added unit tests. Changed the Region Server Status page back to `/regionserver.jsp`. Made sure that `/rs-status` redirects to `/regionserver.jsp`. Extracted the BlockCache inline CSS styles to `hbase.css` file. Also extracted the large BlockCache Hit Ratio periods paging JavaScript code to separate .js file. Introduced a `src/main/resources/hbase-webapps/common` directory where we can place common JSP files which are used by both Master and RegionServer JSP pages. This required to adjust the JSP compiler Maven Antrun plugin a bit. Extracted the inline tablesorter initialization JavaScript code to separate file. Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 7892207) * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f)
apache#7478) * HBASE-29223 Migrate Master Status Jamon page back to JSP (apache#6875) The JSP code is equivalent to the Jamon code, just changed the syntax back to JSP. Request attributes are used to transfer data between JSP pages. Tried to preserve the code as much as possible but did some changes: Sub-templates were usually extracted to separate JSP file (and included with `<jsp:include`), in some case it was extracted as Java method. Extracted some sections from master page to separate JSP pages: - Software Attributes - Warnings Extracted the long JavaScript from the master page which executes on page load to separate JS file. Extracted some frequently used static methods to a new util class: `MasterStatusUtil`. Also added unit tests for the static methods in `MasterStatusUtil`. Changed the Master Status page back to `/master.jsp` again. Now made sure that `/master-status` redirects to `/master.jsp`. Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit be40011) * HBASE-29223 spotless fix * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (apache#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f) (cherry picked from commit d481a46)
The JSP code is equivalent to the Jamon code, just changed the syntax back to JSP. Request attributes are used to transfer data between JSP pages. Tried to preserve the code as much as possible but did some changes: Sub-templates were usually extracted to separate JSP file (and included with `<jsp:include`), in some case it was extracted as Java method. Extracted some sections from master page to separate JSP pages: - Software Attributes - Warnings Extracted the long JavaScript from the master page which executes on page load to separate JS file. Extracted some frequently used static methods to a new util class: `MasterStatusUtil`. Also added unit tests for the static methods in `MasterStatusUtil`. Changed the Master Status page back to `/master.jsp` again. Now made sure that `/master-status` redirects to `/master.jsp`. Signed-off-by: Istvan Toth <[email protected]> (cherry picked from commit be40011) * [ADDENDUM] HBASE-29223 Fix TestMasterStatusUtil (#7416) TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build Signed-off-by: Nihal Jain <[email protected]> Signed-off-by: Duo Zhang <[email protected]> (cherry picked from commit 8ef271f) (cherry picked from commit d481a46)
[ADDENDUM] TestMasterStatusUtil.testGetFragmentationInfoTurnedOn failed in master nightly build.