incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject git commit: Fixing a NPE if a table is disabled and commands are trying to be executed.
Date Tue, 10 Feb 2015 02:47:22 GMT
Repository: incubator-blur
Updated Branches:
  refs/heads/master 310d0c621 -> ddeaf8da3


Fixing a NPE if a table is disabled and commands are trying to be executed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/ddeaf8da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/ddeaf8da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/ddeaf8da

Branch: refs/heads/master
Commit: ddeaf8da339acf8197ca2f15ceca1fa54ff420c0
Parents: 310d0c6
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Feb 9 21:47:18 2015 -0500
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Feb 9 21:47:18 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/blur/thrift/BlurControllerServer.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/ddeaf8da/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
index 77c8fdc..a29867b 100644
--- a/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
+++ b/blur-core/src/main/java/org/apache/blur/thrift/BlurControllerServer.java
@@ -1604,7 +1604,13 @@ public class BlurControllerServer extends TableAdmin implements Iface
{
             return true;
           }
           Map<String, Map<String, String>> layout = _shardServerLayout.get();
+          if (layout == null) {
+            return false;
+          }
           Map<String, String> shardIdToServerMap = layout.get(table);
+          if (shardIdToServerMap == null) {
+            return false;
+          }
           for (Shard shard : shards) {
             String serverId = shardIdToServerMap.get(shard.getShard());
             if (serverId.equals(server.getServer())) {


Mime
View raw message