HBASE-3024 NPE processing server crash in MetaEditor.addDaughter

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@999672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-09-21 22:24:05 +00:00
parent 5fa3d69f66
commit af3bf8cad0
3 changed files with 5 additions and 4 deletions

View File

@ -533,6 +533,7 @@ Release 0.21.0 - Unreleased
HBASE-3018 Bulk assignment on startup runs serially through the cluster HBASE-3018 Bulk assignment on startup runs serially through the cluster
servers assigning in bulk to one at a time servers assigning in bulk to one at a time
HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions
HBASE-3024 NPE processing server crash in MetaEditor.addDaughter
IMPROVEMENTS IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable HBASE-1760 Cleanup TODOs in HTable

View File

@ -100,9 +100,9 @@ public class MetaEditor {
if (serverInfo != null) addLocation(put, serverInfo); if (serverInfo != null) addLocation(put, serverInfo);
server.put(catalogRegionName, put); server.put(catalogRegionName, put);
LOG.info("Added daughter " + regionInfo.getRegionNameAsString() + LOG.info("Added daughter " + regionInfo.getRegionNameAsString() +
" in region " + Bytes.toString(catalogRegionName) + " with " + " in region " + Bytes.toString(catalogRegionName) +
"server=" + serverInfo.getHostnamePort() + ", " + (serverInfo == null?
"startcode=" + serverInfo.getStartCode()); ", serverInfo=null": ", serverInfo=" + serverInfo.getServerName()));
} }
/** /**

View File

@ -152,7 +152,7 @@ public class ServerShutdownHandler extends EventHandler {
if (bytes == null || bytes.length <= 0) return; if (bytes == null || bytes.length <= 0) return;
HRegionInfo hri = Writables.getHRegionInfo(bytes); HRegionInfo hri = Writables.getHRegionInfo(bytes);
if (!hris.containsKey(hri)) { if (!hris.containsKey(hri)) {
LOG.info("Fixup; missing daughter " + hri.getEncodedNameAsBytes()); LOG.info("Fixup; missing daughter " + hri.getEncodedName());
MetaEditor.addDaughter(this.server.getCatalogTracker(), hri, null); MetaEditor.addDaughter(this.server.getCatalogTracker(), hri, null);
this.services.getAssignmentManager().assign(hri); this.services.getAssignmentManager().assign(hri);
} }