From c997c3311e39b218d197c9119bcc42793356fa04 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Thu, 27 Feb 2014 22:26:15 +0000 Subject: [PATCH] HBASE-10630 NullPointerException in ConnectionManager$HConnectionImplementation.locateRegionInMeta() due to missing region info git-svn-id: https://svn.apache.org/repos/asf/hbase/branches/hbase-10070@1572761 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/hadoop/hbase/client/ConnectionManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java index d2b58ae36f6..9a4c8e62456 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java @@ -1065,6 +1065,10 @@ class ConnectionManager { // convert the row result into the HRegionLocation we need! RegionLocations locations = MetaReader.getRegionLocations(regionInfoRow); + if (locations == null || locations.getRegionLocation() == null) { + throw new IOException("HRegionInfo was null in " + + tableName + ", row=" + regionInfoRow); + } HRegionInfo regionInfo = locations.getRegionLocation().getRegionInfo(); if (regionInfo == null) { throw new IOException("HRegionInfo was null or empty in " +