accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-2028 avoid NPE during a table delete when balancing
Date Mon, 16 Dec 2013 19:44:59 GMT
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 37c9a7601 -> 0e3fd3b3c


ACCUMULO-2028 avoid NPE during a table delete when balancing


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0e3fd3b3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0e3fd3b3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0e3fd3b3

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 0e3fd3b3cc26496f5a3e898c52f8fded16a5f203
Parents: 37c9a76
Author: Eric Newton <eric.newton@gmail.com>
Authored: Mon Dec 16 14:44:08 2013 -0500
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Mon Dec 16 14:44:08 2013 -0500

----------------------------------------------------------------------
 .../accumulo/server/master/balancer/TableLoadBalancer.java      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0e3fd3b3/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
index 17b2cf9..f2478b1 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
@@ -52,7 +52,10 @@ public class TableLoadBalancer extends TabletBalancer {
   }
 
   protected String getLoadBalancerClassNameForTable(String table) {
-    if (TableManager.getInstance().getTableState(table).equals(TableState.ONLINE))
+    TableState tableState = TableManager.getInstance().getTableState(table);
+    if (tableState == null)
+      return null;
+    if (tableState.equals(TableState.ONLINE))
       return configuration.getTableConfiguration(table).get(Property.TABLE_LOAD_BALANCER);
     return null;
   }


Mime
View raw message