Description
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.913 s <<< FAILURE! - in org.apache.hadoop.hbase.master.TestUnknownServers [ERROR] org.apache.hadoop.hbase.master.TestUnknownServers.testListUnknownServers Time elapsed: 0.204 s <<< FAILURE! java.lang.AssertionError: expected:<1> but was:<2>
The value of TestUnknownServers.SLAVES is different between branch-2 and master.
It is 1 in master but 2 in branch-2.
The RegionServer marked UNKNOWN_SERVER is the one that holds regions but is not tracked by the ServerManager.
Please see HMaster.getUnknownServers
private List<ServerName> getUnknownServers() { if (serverManager != null) { final Set<ServerName> serverNames = getAssignmentManager().getRegionStates().getRegionStates() .stream().map(RegionState::getServerName).collect(Collectors.toSet()); final List<ServerName> unknownServerNames = serverNames.stream() .filter(sn -> sn != null && serverManager.isServerUnknown(sn)).collect(Collectors.toList()); return unknownServerNames; } return null; }
In UT TestUnknownServers.testListUnknownServers, we start a HBase cluster with 2 RegionServer, if all region are assigned to ONE server, then only that server is called UNKNOWN_SERVER, the UT will fail.
Attachments
Issue Links
- links to