diff --git a/CHANGES.txt b/CHANGES.txt index d93a15c6aa6..d48d7d7fdf8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -256,14 +256,15 @@ Release 0.91.0 - Unreleased Release 0.90.4 - Unreleased BUG FIXES - HBASE-3878 Hbase client throws NoSuchElementException (Ted Yu) - HBASE-3878 Hbase client throws NoSuchElementException (Ted Yu) - HBASE-3881 Add disable balancer in graceful_stop.sh script - HBASE-3895 Fix order of parameters after HBASE-1511 + HBASE-3878 Hbase client throws NoSuchElementException (Ted Yu) + HBASE-3881 Add disable balancer in graceful_stop.sh script + HBASE-3895 Fix order of parameters after HBASE-1511 + HBASE-3874 ServerShutdownHandler fails on NPE if a plan has a random + region assignment IMPROVEMENT - HBASE-3882 hbase-config.sh needs to be updated so it can auto-detects the - sun jre provided by RHEL6 (Roman Shaposhnik) + HBASE-3882 hbase-config.sh needs to be updated so it can auto-detects the + sun jre provided by RHEL6 (Roman Shaposhnik) Release 0.90.3 - Unreleased diff --git a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java b/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java index 5837beb85b2..7e473095b11 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java +++ b/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java @@ -1995,7 +1995,9 @@ public class AssignmentManager extends ZooKeeperListener { for (Iterator > i = this.regionPlans.entrySet().iterator(); i.hasNext();) { Map.Entry e = i.next(); - if (e.getValue().getDestination().equals(sn)) { + ServerName otherSn = e.getValue().getDestination(); + // The name will be null if the region is planned for a random assign. + if (otherSn != null && otherSn.equals(sn)) { // Use iterator's remove else we'll get CME i.remove(); }