HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@999664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffedf2c58e
commit
5fa3d69f66
|
@ -532,6 +532,7 @@ Release 0.21.0 - Unreleased
|
|||
the region
|
||||
HBASE-3018 Bulk assignment on startup runs serially through the cluster
|
||||
servers assigning in bulk to one at a time
|
||||
HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1760 Cleanup TODOs in HTable
|
||||
|
|
|
@ -232,7 +232,8 @@ public class MetaReader {
|
|||
|
||||
/**
|
||||
* @param data A .META. table row.
|
||||
* @return A pair of the regioninfo and the server address from <code>data</code>.
|
||||
* @return A pair of the regioninfo and the server address from <code>data</code>
|
||||
* (or null for server address if no address set in .META.).
|
||||
* @throws IOException
|
||||
*/
|
||||
public static Pair<HRegionInfo, HServerAddress> metaRowToRegionPair(
|
||||
|
@ -410,7 +411,10 @@ public class MetaReader {
|
|||
while((result = metaServer.next(scannerid)) != null) {
|
||||
if (result != null && result.size() > 0) {
|
||||
Pair<HRegionInfo, HServerAddress> pair = metaRowToRegionPair(result);
|
||||
if (!pair.getSecond().equals(hsi.getServerAddress())) continue;
|
||||
if (pair.getSecond() == null ||
|
||||
!pair.getSecond().equals(hsi.getServerAddress())) {
|
||||
continue;
|
||||
}
|
||||
hris.put(pair.getFirst(), result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class ServerManager {
|
|||
String deadServersList = deadservers.toString();
|
||||
LOG.info("regionservers=" + numServers +
|
||||
", averageload=" + StringUtils.limitDecimalTo2(averageLoad) +
|
||||
((numDeadServers > 0)? ("deadservers=" + deadServersList): ""));
|
||||
((numDeadServers > 0)? (", deadservers=" + deadServersList): ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue