accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] git commit: ACCUMULO-3223 Explicitly handle null from getOnlineTabletsForTable
Date Fri, 10 Oct 2014 19:40:01 GMT
ACCUMULO-3223 Explicitly handle null from getOnlineTabletsForTable


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

Branch: refs/heads/1.6
Commit: 3cce10696ebaff3fd8cbb2d5cc109d43a6bf5445
Parents: e18aacd
Author: Josh Elser <elserj@apache.org>
Authored: Fri Oct 10 15:32:43 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Fri Oct 10 15:32:43 2014 -0400

----------------------------------------------------------------------
 .../accumulo/server/master/balancer/DefaultLoadBalancer.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3cce1069/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
b/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
index 9a970e7..7d99bb7 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
@@ -228,7 +228,12 @@ public class DefaultLoadBalancer extends TabletBalancer {
       try {
         if (onlineTabletsForTable == null) {
           onlineTabletsForTable = new HashMap<KeyExtent,TabletStats>();
-          for (TabletStats stat : getOnlineTabletsForTable(tooMuch.server, table))
+          List<TabletStats> stats = getOnlineTabletsForTable(tooMuch.server, table);
+          if (null == stats) {
+            log.warn("Unable to find tablets to move");
+            return result;
+          }
+          for (TabletStats stat : stats)
             onlineTabletsForTable.put(new KeyExtent(stat.extent), stat);
           onlineTablets.put(table, onlineTabletsForTable);
         }


Mime
View raw message