Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,7 @@ private void loadRegionsFromRSReport(final HbckReport report) {

for (Map.Entry<String, HbckRegionInfo> entry : report.getRegionInfoMap().entrySet()) {
HbckRegionInfo hri = entry.getValue();
ServerName locationInMeta = hri.getMetaEntry().getRegionServer();
if (locationInMeta == null) {
continue;
}
ServerName locationInMeta = hri.getMetaEntry().getRegionServer(); // can be null
if (hri.getDeployedOn().size() == 0) {
// skip the offline region which belong to disabled table.
if (report.getDisabledTableRegions().contains(hri.getRegionNameAsString())) {
Expand Down
4 changes: 4 additions & 0 deletions hbase-server/src/main/resources/hbase-webapps/master/hbck.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,13 @@
* If a live server reference, make it a link.
* If dead, make it italic.
* If unknown, make it plain.
* If null, make it "null".
*/
private static String formatServerName(HMaster master,
ServerManager serverManager, ServerName serverName) {
if (serverName == null) {
return "null";
}
String sn = serverName.toString();
if (serverManager.isServerOnline(serverName)) {
int infoPort = master.getRegionServerInfoPort(serverName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ public void testForUserTable() throws Exception {
hbckChore.choreForTesting();
inconsistentRegions = hbckChore.getLastReport().getInconsistentRegions();
assertFalse(inconsistentRegions.containsKey(regionName));

// Test for case4: No region location for a previously reported region. Probably due to
// TRSP bug or bypass.
am.offlineRegion(hri);
hbckChore.choreForTesting();
inconsistentRegions = hbckChore.getLastReport().getInconsistentRegions();
assertTrue(inconsistentRegions.containsKey(regionName));
}

@Test
Expand Down