PDavid commented on code in PR #7416:
URL: https://github.com/apache/hbase/pull/7416#discussion_r2488916138
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/master/http/TestMasterStatusUtil.java:
##########
@@ -203,7 +203,6 @@ public void testGetFragmentationInfoTurnedOn() throws
IOException {
conf.setBoolean("hbase.master.ui.fragmentation.enabled", true);
Map<String, Integer> fragmentationInfo =
MasterStatusUtil.getFragmentationInfo(master, conf);
assertNotNull(fragmentationInfo);
- assertEquals(1, fragmentationInfo.size());
Review Comment:
Thanks, very good question.
So TestMasterStatusUtil.getFragmentationInfo() was originally [part of
MasterStatusServlet](https://github.com/apache/hbase/blob/52eae6934d444b98383026fd46393f886c4497d7/hbase-server/src/main/java/org/apache/hadoop/hbase/master/http/MasterStatusServlet.java)
and I migrated it to the static util class under
https://github.com/apache/hbase/pull/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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]