From 96e5f040369b3250750f44c8791535c62f494f6c Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 2 Dec 2015 10:40:51 -0800 Subject: [PATCH] HBASE-14909 NPE testing for RIT --- .../java/org/apache/hadoop/hbase/HBaseTestingUtility.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index cb508f6beaf..10d8e1c6213 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -4003,8 +4003,11 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { @Override public boolean evaluate() throws IOException { - final RegionStates regionStates = getMiniHBaseCluster().getMaster() - .getAssignmentManager().getRegionStates(); + HMaster master = getMiniHBaseCluster().getMaster(); + if (master == null) return false; + AssignmentManager am = master.getAssignmentManager(); + if (am == null) return false; + final RegionStates regionStates = am.getRegionStates(); return !regionStates.isRegionsInTransition(); } };