accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1337131 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
Date Fri, 11 May 2012 12:47:10 GMT
Author: kturner
Date: Fri May 11 12:47:09 2012
New Revision: 1337131

URL: http://svn.apache.org/viewvc?rev=1337131&view=rev
Log:
ACCUMULO-590 fixed NPE in Table load balancer

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java?rev=1337131&r1=1337130&r2=1337131&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/balancer/TableLoadBalancer.java
Fri May 11 12:47:09 2012
@@ -32,7 +32,6 @@ import org.apache.accumulo.core.conf.Pro
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
 import org.apache.accumulo.server.security.SecurityConstants;
@@ -44,11 +43,6 @@ public class TableLoadBalancer extends T
   private static final Logger log = Logger.getLogger(TableLoadBalancer.class);
   
   Map<String,TabletBalancer> perTableBalancers = new HashMap<String,TabletBalancer>();
-  ServerConfiguration config;
-  
-  public void init(ServerConfiguration config) {
-    this.config = config;
-  }
   
   private TabletBalancer constructNewBalancerForTable(String clazzName, String table) throws
Exception {
     Class<? extends TabletBalancer> clazz = AccumuloClassLoader.loadClass(clazzName,
TabletBalancer.class);
@@ -57,7 +51,7 @@ public class TableLoadBalancer extends T
   }
   
   protected String getLoadBalancerClassNameForTable(String table) {
-    return config.getTableConfiguration(table).get(Property.TABLE_LOAD_BALANCER);
+    return configuration.getTableConfiguration(table).get(Property.TABLE_LOAD_BALANCER);
   }
   
   protected TabletBalancer getBalancerForTable(String table) {



Mime
View raw message