From d5886b610fd629bc1ecebcf7638e6ee4aa98fe8e Mon Sep 17 00:00:00 2001 From: "terence.yoo" Date: Mon, 21 Aug 2017 17:28:15 +0900 Subject: [PATCH] Fix NPE --- .../java/com/kakao/hbase/manager/command/BalanceRule.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/BalanceRule.java b/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/BalanceRule.java index ecf3d42..ad31244 100644 --- a/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/BalanceRule.java +++ b/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/BalanceRule.java @@ -105,7 +105,10 @@ private static List makeStochasticPlan( Map regionAssignmentMap = Balance.getRegionAssignmentMap(admin, tableNameSet); for (Map.Entry entry : regionAssignmentMap.entrySet()) { - clusterState.get(entry.getValue()).add(entry.getKey()); + List hRegionInfos = clusterState.get(entry.getValue()); + if (hRegionInfos != null) { + hRegionInfos.add(entry.getKey()); + } } Configuration conf = admin.getConfiguration();