accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject accumulo git commit: ACCUMULO-4642 Changes to remove ServerConfiguration.getInstance()
Date Fri, 09 Jun 2017 18:48:26 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 5956d4569 -> abca21b66


ACCUMULO-4642 Changes to remove ServerConfiguration.getInstance()


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

Branch: refs/heads/master
Commit: abca21b66fbedf2162dcc791c0a14d425f6bdea5
Parents: 5956d45
Author: Mike Miller <mmiller@apache.org>
Authored: Fri Jun 9 14:01:16 2017 -0400
Committer: Mike Miller <mmiller@apache.org>
Committed: Fri Jun 9 14:01:16 2017 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/server/Accumulo.java    |  6 ++--
 .../accumulo/server/AccumuloServerContext.java  |  9 +++--
 .../server/conf/ServerConfiguration.java        |  3 --
 .../server/conf/ServerConfigurationFactory.java |  4 ---
 .../server/conf/TableConfiguration.java         |  8 +++--
 .../apache/accumulo/server/init/Initialize.java |  7 ++--
 .../master/balancer/ChaoticLoadBalancer.java    |  4 +++
 .../balancer/HostRegexTableLoadBalancer.java    | 12 +++----
 .../master/balancer/RegexGroupBalancer.java     |  6 ++--
 .../master/balancer/TableLoadBalancer.java      | 11 +++---
 .../server/master/balancer/TabletBalancer.java  | 18 +++++++---
 .../server/problems/ProblemReports.java         |  4 ++-
 .../tabletserver/LargestFirstMemoryManager.java |  7 ++--
 .../org/apache/accumulo/server/util/Admin.java  |  2 +-
 .../server/util/FindOfflineTablets.java         |  4 ++-
 .../accumulo/server/util/ListVolumesUsed.java   |  7 ++--
 .../accumulo/server/util/RandomizeVolumes.java  |  4 ++-
 .../server/AccumuloServerContextTest.java       |  4 ---
 .../conf/ServerConfigurationFactoryTest.java    |  6 ----
 .../BaseHostRegexTableLoadBalancerTest.java     | 11 ++++--
 ...gexTableLoadBalancerReconfigurationTest.java |  3 +-
 .../HostRegexTableLoadBalancerTest.java         | 35 ++++++++++++--------
 .../master/balancer/TableLoadBalancerTest.java  | 23 +++++++------
 .../accumulo/server/util/TServerUtilsTest.java  |  2 +-
 .../accumulo/gc/SimpleGarbageCollector.java     |  8 ++---
 .../accumulo/gc/SimpleGarbageCollectorTest.java |  3 +-
 .../java/org/apache/accumulo/master/Master.java | 14 ++++----
 .../master/MasterClientServiceHandler.java      |  3 +-
 .../org/apache/accumulo/monitor/Monitor.java    |  6 ++--
 .../org/apache/accumulo/tracer/TraceServer.java | 14 ++++----
 .../apache/accumulo/tserver/TabletServer.java   | 12 +++----
 .../tserver/LargestFirstMemoryManagerTest.java  |  8 -----
 .../shell/commands/ListBulkCommand.java         |  4 ++-
 .../apache/accumulo/test/GetMasterStats.java    |  4 ++-
 .../org/apache/accumulo/test/TotalQueuedIT.java |  2 +-
 .../apache/accumulo/test/WrongTabletTest.java   |  2 +-
 .../test/functional/SplitRecoveryIT.java        |  2 +-
 .../accumulo/test/functional/ZombieTServer.java |  4 ++-
 .../CloseWriteAheadLogReferencesIT.java         |  3 +-
 .../test/performance/thrift/NullTserver.java    | 19 ++++++-----
 40 files changed, 167 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java b/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
index c5fbc66..1d5369b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/Accumulo.java
@@ -28,9 +28,9 @@ import java.util.Arrays;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.util.AddressUtil;
@@ -102,11 +102,11 @@ public class Accumulo {
     return ServerConstants.getInstanceIdLocation(v);
   }
 
-  public static void init(VolumeManager fs, ServerConfigurationFactory serverConfig, String application) throws IOException {
+  public static void init(VolumeManager fs, Instance instance, ServerConfigurationFactory serverConfig, String application) throws IOException {
     final AccumuloConfiguration conf = serverConfig.getSystemConfiguration();
 
     log.info(application + " starting");
-    log.info("Instance " + serverConfig.getInstance().getInstanceID());
+    log.info("Instance " + instance.getInstanceID());
     int dataVersion = Accumulo.getAccumuloPersistentVersion(fs);
     log.info("Data Version " + dataVersion);
     Accumulo.waitForZookeeperAndHdfs(fs);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
index 37ac6d9..737ae91 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/AccumuloServerContext.java
@@ -19,7 +19,6 @@ package org.apache.accumulo.server;
 import static com.google.common.base.Preconditions.checkArgument;
 
 import java.io.IOException;
-
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
@@ -53,15 +52,15 @@ public class AccumuloServerContext extends ClientContext {
   /**
    * Construct a server context from the server's configuration
    */
-  public AccumuloServerContext(ServerConfigurationFactory confFactory) {
-    this(confFactory, null);
+  public AccumuloServerContext(Instance instance, ServerConfigurationFactory confFactory) {
+    this(instance, confFactory, null);
   }
 
   /**
    * Construct a server context from the server's configuration
    */
-  public AccumuloServerContext(ServerConfigurationFactory confFactory, AuthenticationTokenSecretManager secretManager) {
-    super(confFactory.getInstance(), getCredentials(confFactory.getInstance()), confFactory.getSystemConfiguration());
+  private AccumuloServerContext(Instance instance, ServerConfigurationFactory confFactory, AuthenticationTokenSecretManager secretManager) {
+    super(instance, getCredentials(instance), confFactory.getSystemConfiguration());
     this.confFactory = confFactory;
     this.secretManager = secretManager;
     if (null != getSaslParams()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
index d29ff89..8417713 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfiguration.java
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.server.conf;
 
-import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 
 public abstract class ServerConfiguration {
@@ -27,6 +26,4 @@ public abstract class ServerConfiguration {
 
   abstract public AccumuloConfiguration getSystemConfiguration();
 
-  abstract public Instance getInstance();
-
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
index 65451a6..a5d20ea 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ServerConfigurationFactory.java
@@ -192,8 +192,4 @@ public class ServerConfigurationFactory extends ServerConfiguration {
     return conf;
   }
 
-  @Override
-  public Instance getInstance() {
-    return instance;
-  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
index f040701..568594a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfiguration.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static java.util.Objects.requireNonNull;
+
 import java.util.Map;
 import java.util.function.Predicate;
 
@@ -44,9 +46,9 @@ public class TableConfiguration extends ObservableConfiguration {
   private final String tableId;
 
   public TableConfiguration(Instance instance, String tableId, NamespaceConfiguration parent) {
-    this.instance = instance;
-    this.tableId = tableId;
-    this.parent = parent;
+    this.instance = requireNonNull(instance);
+    this.tableId = requireNonNull(tableId);
+    this.parent = requireNonNull(parent);
   }
 
   void setZooCacheFactory(ZooCacheFactory zcf) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index 804cc83..5c4cf8d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -355,7 +355,8 @@ public class Initialize implements KeywordExecutable {
       return false;
     }
 
-    final ServerConfigurationFactory confFactory = new ServerConfigurationFactory(HdfsZooInstance.getInstance());
+    final Instance instance = HdfsZooInstance.getInstance();
+    final ServerConfigurationFactory confFactory = new ServerConfigurationFactory(instance);
 
     // When we're using Kerberos authentication, we need valid credentials to perform initialization. If the user provided some, use them.
     // If they did not, fall back to the credentials present in accumulo-site.xml that the servers will use themselves.
@@ -385,7 +386,7 @@ public class Initialize implements KeywordExecutable {
     }
 
     try {
-      AccumuloServerContext context = new AccumuloServerContext(confFactory);
+      AccumuloServerContext context = new AccumuloServerContext(instance, confFactory);
       initSecurity(context, opts, uuid.toString(), rootUser);
     } catch (Exception e) {
       log.error("FATAL: Failed to initialize security", e);
@@ -775,7 +776,7 @@ public class Initialize implements KeywordExecutable {
       if (opts.resetSecurity) {
         log.info("Resetting security on accumulo.");
         Instance instance = HdfsZooInstance.getInstance();
-        AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(instance));
+        AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(instance));
         if (isInitialized(fs)) {
           if (!opts.forceResetSecurity) {
             ConsoleReader c = getConsoleReader();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
index 4d1126d..c93c4b9 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/ChaoticLoadBalancer.java
@@ -31,6 +31,7 @@ import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
+import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
@@ -165,4 +166,7 @@ public class ChaoticLoadBalancer extends TabletBalancer {
   @Override
   public void init(ServerConfigurationFactory conf) {}
 
+  @Override
+  public void init(AccumuloServerContext context) {}
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
index 5023b36..4ee74ca 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -38,8 +38,8 @@ import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
+import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.conf.ServerConfiguration;
-import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
 import org.apache.commons.lang.builder.ToStringBuilder;
@@ -242,9 +242,9 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
   }
 
   @Override
-  public void init(ServerConfigurationFactory conf) {
-    super.init(conf);
-    parseConfiguration(conf);
+  public void init(AccumuloServerContext context) {
+    super.init(context);
+    parseConfiguration(context.getServerConfigurationFactory());
   }
 
   @Override
@@ -382,12 +382,12 @@ public class HostRegexTableLoadBalancer extends TableLoadBalancer implements Con
 
   @Override
   public void propertyChanged(String key) {
-    parseConfiguration(this.configuration);
+    parseConfiguration(context.getServerConfigurationFactory());
   }
 
   @Override
   public void propertiesChanged() {
-    parseConfiguration(this.configuration);
+    parseConfiguration(context.getServerConfigurationFactory());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
index f165ea3..ec8908b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/RegexGroupBalancer.java
@@ -57,7 +57,8 @@ public class RegexGroupBalancer extends GroupBalancer {
 
   @Override
   protected long getWaitTime() {
-    Map<String,String> customProps = configuration.getTableConfiguration(tableId).getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
+    Map<String,String> customProps = context.getServerConfigurationFactory().getTableConfiguration(tableId)
+        .getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
     if (customProps.containsKey(WAIT_TIME_PROPERTY)) {
       return ConfigurationTypeHelper.getTimeInMillis(customProps.get(WAIT_TIME_PROPERTY));
     }
@@ -68,7 +69,8 @@ public class RegexGroupBalancer extends GroupBalancer {
   @Override
   protected Function<KeyExtent,String> getPartitioner() {
 
-    Map<String,String> customProps = configuration.getTableConfiguration(tableId).getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
+    Map<String,String> customProps = context.getServerConfigurationFactory().getTableConfiguration(tableId)
+        .getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
     String regex = customProps.get(REGEX_PROPERTY);
     final String defaultGroup = customProps.get(DEFAUT_GROUP_PROPERTY);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/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 de3f4f7..dedf2a2 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
@@ -47,8 +47,7 @@ public class TableLoadBalancer extends TabletBalancer {
 
   private TabletBalancer constructNewBalancerForTable(String clazzName, String table) throws Exception {
     String context = null;
-    if (null != configuration)
-      context = configuration.getTableConfiguration(table).get(Property.TABLE_CLASSPATH);
+    context = this.context.getServerConfigurationFactory().getTableConfiguration(table).get(Property.TABLE_CLASSPATH);
     Class<? extends TabletBalancer> clazz;
     if (context != null && !context.equals(""))
       clazz = AccumuloVFSClassLoader.getContextManager().loadClass(context, clazzName, TabletBalancer.class);
@@ -63,7 +62,7 @@ public class TableLoadBalancer extends TabletBalancer {
     if (tableState == null)
       return null;
     if (tableState.equals(TableState.ONLINE))
-      return configuration.getTableConfiguration(table).get(Property.TABLE_LOAD_BALANCER);
+      return this.context.getServerConfigurationFactory().getTableConfiguration(table).get(Property.TABLE_LOAD_BALANCER);
     return null;
   }
 
@@ -83,7 +82,7 @@ public class TableLoadBalancer extends TabletBalancer {
           if (newBalancer != null) {
             balancer = newBalancer;
             perTableBalancers.put(table, balancer);
-            balancer.init(configuration);
+            balancer.init(this.context);
           }
 
           log.info("Loaded new class " + clazzName + " for table " + table);
@@ -105,7 +104,7 @@ public class TableLoadBalancer extends TabletBalancer {
         balancer = new DefaultLoadBalancer(table);
       }
       perTableBalancers.put(table, balancer);
-      balancer.init(configuration);
+      balancer.init(this.context);
     }
     return balancer;
   }
@@ -135,7 +134,7 @@ public class TableLoadBalancer extends TabletBalancer {
   protected TableOperations getTableOperations() {
     if (tops == null)
       try {
-        tops = context.getConnector().tableOperations();
+        tops = this.context.getConnector().tableOperations();
       } catch (AccumuloException e) {
         log.error("Unable to access table operations from within table balancer", e);
       } catch (AccumuloSecurityException e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
index 1b4e9f5..81ebe7a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
@@ -33,6 +33,7 @@ import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.server.AccumuloServerContext;
+import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
@@ -55,16 +56,25 @@ public abstract class TabletBalancer {
 
   private static final Logger log = LoggerFactory.getLogger(TabletBalancer.class);
 
-  protected ServerConfigurationFactory configuration;
-
   protected AccumuloServerContext context;
 
   /**
    * Initialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.
+   *
+   * @deprecated since 2.0.0; use {@link #init(AccumuloServerContext)} instead.
    */
+  @Deprecated
   public void init(ServerConfigurationFactory conf) {
-    context = new AccumuloServerContext(conf);
-    configuration = conf;
+    init(new AccumuloServerContext(HdfsZooInstance.getInstance(), conf));
+  }
+
+  /**
+   * Initialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.
+   *
+   * @since 2.0.0
+   */
+  public void init(AccumuloServerContext context) {
+    this.context = context;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index 82e9f5b..2d570c8 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -32,6 +32,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
@@ -300,7 +301,8 @@ public class ProblemReports implements Iterable<ProblemReport> {
   }
 
   public static void main(String args[]) throws Exception {
-    getInstance(new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance()))).printProblems();
+    Instance instance = HdfsZooInstance.getInstance();
+    getInstance(new AccumuloServerContext(instance, new ServerConfigurationFactory(instance))).printProblems();
   }
 
   public Map<String,Map<ProblemType,Integer>> summarize() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
index babaf4c..0fcbab1 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
@@ -24,9 +24,9 @@ import java.util.TreeMap;
 
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.impl.KeyExtent;
+import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -146,7 +146,8 @@ public class LargestFirstMemoryManager implements MemoryManager {
   }
 
   protected boolean tableExists(Instance instance, String tableId) {
-    return Tables.exists(instance, tableId);
+    // make sure that the table still exists by checking if it has a configuration
+    return config.getTableConfiguration(tableId) != null;
   }
 
   @Override
@@ -154,7 +155,7 @@ public class LargestFirstMemoryManager implements MemoryManager {
     if (maxMemory < 0)
       throw new IllegalStateException("need to initialize " + LargestFirstMemoryManager.class.getName());
 
-    final Instance instance = config.getInstance();
+    final Instance instance = HdfsZooInstance.getInstance();
     final int maxMinCs = maxConcurrentMincs * numWaitingMultiplier;
 
     mincIdleThresholds.clear();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
index 44171da..1400777 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java
@@ -213,7 +213,7 @@ public class Admin implements KeywordExecutable {
     ServerConfigurationFactory confFactory = new ServerConfigurationFactory(instance);
 
     try {
-      ClientContext context = new AccumuloServerContext(confFactory);
+      ClientContext context = new AccumuloServerContext(instance, confFactory);
 
       int rc = 0;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
index 98101ec..270f132 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
@@ -21,6 +21,7 @@ import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.impl.ClientContext;
 import org.apache.accumulo.core.client.impl.Tables;
@@ -51,7 +52,8 @@ public class FindOfflineTablets {
   public static void main(String[] args) throws Exception {
     ClientOpts opts = new ClientOpts();
     opts.parseArgs(FindOfflineTablets.class.getName(), args);
-    AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(opts.getInstance()));
+    Instance instance = opts.getInstance();
+    AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(opts.getInstance()));
     findOffline(context, null);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/util/ListVolumesUsed.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ListVolumesUsed.java b/server/base/src/main/java/org/apache/accumulo/server/util/ListVolumesUsed.java
index 3e30aaf..57a028e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ListVolumesUsed.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ListVolumesUsed.java
@@ -21,6 +21,7 @@ import java.util.Map.Entry;
 import java.util.TreeSet;
 
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.impl.ClientContext;
 import org.apache.accumulo.core.data.Key;
@@ -38,13 +39,11 @@ import org.apache.accumulo.server.log.WalStateManager;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.fs.Path;
 
-/**
- *
- */
 public class ListVolumesUsed {
 
   public static void main(String[] args) throws Exception {
-    listVolumes(new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance())));
+    Instance instance = HdfsZooInstance.getInstance();
+    listVolumes(new AccumuloServerContext(instance, new ServerConfigurationFactory(instance)));
   }
 
   private static String getTableURI(String rootTabletDir) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
index f9063c8..fd3077b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java
@@ -29,6 +29,7 @@ import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.data.Key;
@@ -58,7 +59,8 @@ public class RandomizeVolumes {
     opts.parseArgs(RandomizeVolumes.class.getName(), args);
     Connector c;
     if (opts.getToken() == null) {
-      AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(opts.getInstance()));
+      Instance instance = opts.getInstance();
+      AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(instance));
       c = context.getConnector();
     } else {
       c = opts.getConnector();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/AccumuloServerContextTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/AccumuloServerContextTest.java b/server/base/src/test/java/org/apache/accumulo/server/AccumuloServerContextTest.java
index 33dfe17..03003df 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/AccumuloServerContextTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/AccumuloServerContextTest.java
@@ -23,10 +23,8 @@ import java.io.DataOutputStream;
 import java.security.PrivilegedExceptionAction;
 import java.util.Iterator;
 import java.util.Map.Entry;
-
 import org.apache.accumulo.core.client.ClientConfiguration;
 import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
-import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.ClientContext;
 import org.apache.accumulo.core.client.impl.Credentials;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
@@ -68,7 +66,6 @@ public class AccumuloServerContextTest {
     testUser.doAs(new PrivilegedExceptionAction<Void>() {
       @Override
       public Void run() throws Exception {
-        Instance instance = EasyMock.createMock(Instance.class);
 
         ClientConfiguration clientConf = ClientConfiguration.loadDefault();
         clientConf.setProperty(ClientProperty.INSTANCE_RPC_SASL_ENABLED, "true");
@@ -88,7 +85,6 @@ public class AccumuloServerContextTest {
         ServerConfigurationFactory factory = EasyMock.createMock(ServerConfigurationFactory.class);
         EasyMock.expect(factory.getSystemConfiguration()).andReturn(conf).anyTimes();
         EasyMock.expect(factory.getSiteConfiguration()).andReturn(siteConfig).anyTimes();
-        EasyMock.expect(factory.getInstance()).andReturn(instance).anyTimes();
 
         AccumuloServerContext context = EasyMock.createMockBuilder(AccumuloServerContext.class).addMockedMethod("enforceKerberosLogin")
             .addMockedMethod("getConfiguration").addMockedMethod("getServerConfigurationFactory").addMockedMethod("getCredentials").createMock();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/conf/ServerConfigurationFactoryTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/ServerConfigurationFactoryTest.java b/server/base/src/test/java/org/apache/accumulo/server/conf/ServerConfigurationFactoryTest.java
index 3fd1403..57953c2 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/conf/ServerConfigurationFactoryTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/conf/ServerConfigurationFactoryTest.java
@@ -92,12 +92,6 @@ public class ServerConfigurationFactoryTest {
   }
 
   @Test
-  public void testGetInstance() {
-    ready();
-    assertSame(instance, scf.getInstance());
-  }
-
-  @Test
   public void testGetDefaultConfiguration() {
     ready();
     DefaultConfiguration c = scf.getDefaultConfiguration();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
index 3969dd2..614fd4b 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/BaseHostRegexTableLoadBalancerTest.java
@@ -28,20 +28,22 @@ import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.function.Predicate;
-
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.admin.TableOperations;
 import org.apache.accumulo.core.client.impl.ClientContext;
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.TableOperationsImpl;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
+import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.server.conf.NamespaceConfiguration;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.master.state.TServerInstance;
@@ -134,8 +136,11 @@ public abstract class BaseHostRegexTableLoadBalancerTest extends HostRegexTableL
 
   protected static class TestServerConfigurationFactory extends ServerConfigurationFactory {
 
+    final Instance instance;
+
     public TestServerConfigurationFactory(Instance instance) {
       super(instance);
+      this.instance = instance;
     }
 
     @Override
@@ -145,7 +150,9 @@ public abstract class BaseHostRegexTableLoadBalancerTest extends HostRegexTableL
 
     @Override
     public TableConfiguration getTableConfiguration(String tableId) {
-      return new TableConfiguration(getInstance(), tableId, null) {
+      // create a dummy namespaceConfiguration to satisfy requireNonNull in TableConfiguration constructor
+      NamespaceConfiguration dummyConf = new NamespaceConfiguration(Namespaces.DEFAULT_NAMESPACE_ID, this.instance, DefaultConfiguration.getInstance());
+      return new TableConfiguration(this.instance, tableId, dummyConf) {
         @Override
         public String get(Property property) {
           return DEFAULT_TABLE_PROPERTIES.get(property.name());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerReconfigurationTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerReconfigurationTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerReconfigurationTest.java
index 14f6c3e..9c27142 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerReconfigurationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerReconfigurationTest.java
@@ -29,6 +29,7 @@ import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.fate.util.UtilWaitThread;
+import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
 import org.apache.thrift.TException;
@@ -42,7 +43,7 @@ public class HostRegexTableLoadBalancerReconfigurationTest extends BaseHostRegex
   @Test
   public void testConfigurationChanges() {
 
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
     for (List<KeyExtent> extents : tableExtents.values()) {
       for (KeyExtent ke : extents) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
index e14001f..5a8fa0b 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancerTest.java
@@ -28,15 +28,19 @@ import java.util.SortedMap;
 import java.util.function.Predicate;
 import java.util.regex.Pattern;
 
+import org.apache.accumulo.core.client.impl.Namespaces;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
+import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.fate.util.UtilWaitThread;
+import org.apache.accumulo.server.AccumuloServerContext;
+import org.apache.accumulo.server.conf.NamespaceConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
@@ -48,7 +52,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testInit() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Assert.assertEquals("OOB check interval value is incorrect", 2000, this.getOobCheckMillis());
     Assert.assertFalse(isIpBasedRegex());
     Map<String,Pattern> patterns = this.getPoolNameToRegexPattern();
@@ -71,7 +75,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
   @Test
   public void testBalanceWithMigrations() {
     List<TabletMigration> migrations = new ArrayList<>();
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     long wait = this.balance(Collections.unmodifiableSortedMap(createCurrent(2)), Collections.singleton(new KeyExtent()), migrations);
     Assert.assertEquals(20000, wait);
     Assert.assertEquals(0, migrations.size());
@@ -79,7 +83,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testSplitCurrentByRegexUsingHostname() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this.splitCurrentByRegex(createCurrent(15));
     Assert.assertEquals(3, groups.size());
     Assert.assertTrue(groups.containsKey(FOO.getTableName()));
@@ -110,10 +114,12 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testSplitCurrentByRegexUsingOverlappingPools() {
-    init(new TestServerConfigurationFactory(instance) {
+    init(new AccumuloServerContext(instance, new TestServerConfigurationFactory(instance) {
+
       @Override
       public TableConfiguration getTableConfiguration(String tableId) {
-        return new TableConfiguration(getInstance(), tableId, null) {
+        NamespaceConfiguration defaultConf = new NamespaceConfiguration(Namespaces.DEFAULT_NAMESPACE_ID, this.instance, DefaultConfiguration.getInstance());
+        return new TableConfiguration(instance, tableId, defaultConf) {
           HashMap<String,String> tableProperties = new HashMap<>();
           {
             tableProperties.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + FOO.getTableName(), "r.*");
@@ -135,7 +141,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
           }
         };
       }
-    });
+    }));
     Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this.splitCurrentByRegex(createCurrent(15));
     Assert.assertEquals(2, groups.size());
     Assert.assertTrue(groups.containsKey(FOO.getTableName()));
@@ -173,7 +179,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testSplitCurrentByRegexUsingIP() {
-    init(new TestServerConfigurationFactory(instance) {
+    init(new AccumuloServerContext(instance, new TestServerConfigurationFactory(instance) {
       @Override
       public synchronized AccumuloConfiguration getSystemConfiguration() {
         HashMap<String,String> props = new HashMap<>();
@@ -184,7 +190,8 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
       @Override
       public TableConfiguration getTableConfiguration(String tableId) {
-        return new TableConfiguration(getInstance(), tableId, null) {
+        NamespaceConfiguration defaultConf = new NamespaceConfiguration(Namespaces.DEFAULT_NAMESPACE_ID, this.instance, DefaultConfiguration.getInstance());
+        return new TableConfiguration(instance, tableId, defaultConf) {
           HashMap<String,String> tableProperties = new HashMap<>();
           {
             tableProperties.put(HostRegexTableLoadBalancer.HOST_BALANCER_PREFIX + FOO.getTableName(), "192\\.168\\.0\\.[1-5]");
@@ -206,7 +213,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
           }
         };
       }
-    });
+    }));
     Assert.assertTrue(isIpBasedRegex());
     Map<String,SortedMap<TServerInstance,TabletServerStatus>> groups = this.splitCurrentByRegex(createCurrent(15));
     Assert.assertEquals(3, groups.size());
@@ -238,7 +245,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testAllUnassigned() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
     for (List<KeyExtent> extents : tableExtents.values()) {
@@ -269,7 +276,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testAllAssigned() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
     this.getAssignments(Collections.unmodifiableSortedMap(allTabletServers), Collections.unmodifiableMap(unassigned), assignments);
@@ -278,7 +285,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testPartiallyAssigned() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
     int i = 0;
@@ -313,7 +320,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testUnassignedWithNoTServers() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     Map<KeyExtent,TServerInstance> assignments = new HashMap<>();
     Map<KeyExtent,TServerInstance> unassigned = new HashMap<>();
     for (KeyExtent ke : tableExtents.get(BAR.getTableName())) {
@@ -343,7 +350,7 @@ public class HostRegexTableLoadBalancerTest extends BaseHostRegexTableLoadBalanc
 
   @Test
   public void testOutOfBoundsTablets() {
-    init(factory);
+    init(new AccumuloServerContext(instance, factory));
     // Wait to trigger the out of bounds check which will call our version of getOnlineTabletsForTable
     UtilWaitThread.sleep(11000);
     Set<KeyExtent> migrations = new HashSet<>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
index f34cc3d..8856e08 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.server.master.balancer;
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.net.HostAndPort;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -25,7 +27,6 @@ import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.UUID;
-
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.admin.TableOperations;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
@@ -35,6 +36,8 @@ import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
+import org.apache.accumulo.server.AccumuloServerContext;
+import org.apache.accumulo.server.conf.NamespaceConfiguration;
 import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.master.state.TServerInstance;
@@ -45,9 +48,6 @@ import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Test;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.net.HostAndPort;
-
 public class TableLoadBalancerTest {
 
   private static Map<String,String> TABLE_ID_MAP = ImmutableMap.of("t1", "a1", "t2", "b12", "t3", "c4");
@@ -96,7 +96,7 @@ public class TableLoadBalancerTest {
     }
 
     @Override
-    public void init(ServerConfigurationFactory conf) {}
+    public void init(AccumuloServerContext context) {}
 
     @Override
     public List<TabletStats> getOnlineTabletsForTable(TServerInstance tserver, String tableId) throws ThriftSecurityException, TException {
@@ -111,9 +111,6 @@ public class TableLoadBalancerTest {
       super();
     }
 
-    @Override
-    public void init(ServerConfigurationFactory conf) {}
-
     // use our new classname to test class loading
     @Override
     protected String getLoadBalancerClassNameForTable(String table) {
@@ -139,12 +136,16 @@ public class TableLoadBalancerTest {
   public void test() throws Exception {
     final Instance inst = EasyMock.createMock(Instance.class);
     EasyMock.expect(inst.getInstanceID()).andReturn(UUID.nameUUIDFromBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}).toString()).anyTimes();
+    EasyMock.expect(inst.getZooKeepers()).andReturn("10.0.0.1:1234").anyTimes();
+    EasyMock.expect(inst.getZooKeepersSessionTimeOut()).andReturn(30_000).anyTimes();
     EasyMock.replay(inst);
 
     ServerConfigurationFactory confFactory = new ServerConfigurationFactory(inst) {
       @Override
       public TableConfiguration getTableConfiguration(String tableId) {
-        return new TableConfiguration(inst, tableId, null) {
+        // create a dummy namespaceConfiguration to satisfy requireNonNull in TableConfiguration constructor
+        NamespaceConfiguration dummyConf = new NamespaceConfiguration("", null, null);
+        return new TableConfiguration(inst, tableId, dummyConf) {
           @Override
           public String get(Property property) {
             // fake the get table configuration so the test doesn't try to look in zookeeper for per-table classpath stuff
@@ -162,13 +163,13 @@ public class TableLoadBalancerTest {
     Set<KeyExtent> migrations = Collections.emptySet();
     List<TabletMigration> migrationsOut = new ArrayList<>();
     TableLoadBalancer tls = new TableLoadBalancer();
-    tls.init(confFactory);
+    tls.init(new AccumuloServerContext(inst, confFactory));
     tls.balance(state, migrations, migrationsOut);
     Assert.assertEquals(0, migrationsOut.size());
 
     state.put(mkts("10.0.0.2", "0x02030405"), status());
     tls = new TableLoadBalancer();
-    tls.init(confFactory);
+    tls.init(new AccumuloServerContext(inst, confFactory));
     tls.balance(state, migrations, migrationsOut);
     int count = 0;
     Map<String,Integer> movedByTable = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
index 5a9fab0..4546b8a 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java
@@ -332,7 +332,7 @@ public class TServerUtilsTest {
   }
 
   private ServerAddress startServer() throws Exception {
-    AccumuloServerContext ctx = new AccumuloServerContext(factory);
+    AccumuloServerContext ctx = new AccumuloServerContext(instance, factory);
     ClientServiceHandler clientHandler = new ClientServiceHandler(ctx, null, null);
     Iface rpcProxy = RpcWrapper.service(clientHandler);
     Processor<Iface> processor = new Processor<>(rpcProxy);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index b762e19..7719766 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -150,10 +150,10 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
     log.info("Version " + Constants.VERSION);
     log.info("Instance " + instance.getInstanceID());
     final VolumeManager fs = VolumeManagerImpl.get();
-    Accumulo.init(fs, conf, app);
+    Accumulo.init(fs, instance, conf, app);
     Opts opts = new Opts();
     opts.parseArgs(app, args);
-    SimpleGarbageCollector gc = new SimpleGarbageCollector(opts, fs, conf);
+    SimpleGarbageCollector gc = new SimpleGarbageCollector(opts, instance, fs, conf);
 
     DistributedTrace.enable(opts.getAddress(), app, conf.getSystemConfiguration());
     try {
@@ -169,8 +169,8 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa
    * @param opts
    *          options
    */
-  public SimpleGarbageCollector(Opts opts, VolumeManager fs, ServerConfigurationFactory confFactory) {
-    super(confFactory);
+  public SimpleGarbageCollector(Opts opts, Instance instance, VolumeManager fs, ServerConfigurationFactory confFactory) {
+    super(instance, confFactory);
     this.opts = opts;
     this.fs = fs;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
----------------------------------------------------------------------
diff --git a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
index 3ab6cbf..a987f4f 100644
--- a/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
+++ b/server/gc/src/test/java/org/apache/accumulo/gc/SimpleGarbageCollectorTest.java
@@ -71,7 +71,6 @@ public class SimpleGarbageCollectorTest {
     opts = new Opts();
     systemConfig = createSystemConfig();
     ServerConfigurationFactory factory = createMock(ServerConfigurationFactory.class);
-    expect(factory.getInstance()).andReturn(instance).anyTimes();
     expect(factory.getSystemConfiguration()).andReturn(systemConfig).anyTimes();
     expect(factory.getSiteConfiguration()).andReturn(siteConfig).anyTimes();
 
@@ -102,7 +101,7 @@ public class SimpleGarbageCollectorTest {
     replay(instance, factory, siteConfig);
 
     credentials = SystemCredentials.get(instance);
-    gc = new SimpleGarbageCollector(opts, volMgr, factory);
+    gc = new SimpleGarbageCollector(opts, instance, volMgr, factory);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/master/src/main/java/org/apache/accumulo/master/Master.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 1b6f303..51d0748 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -44,6 +44,7 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.impl.Namespaces;
@@ -595,8 +596,8 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
       throw new ThriftTableOperationException(tableId, null, TableOperation.MERGE, TableOperationExceptionType.OFFLINE, "table is not online");
   }
 
-  public Master(ServerConfigurationFactory config, VolumeManager fs, String hostname) throws IOException {
-    super(config);
+  public Master(Instance instance, ServerConfigurationFactory config, VolumeManager fs, String hostname) throws IOException {
+    super(instance, config);
     this.serverConfig = config;
     this.fs = fs;
     this.hostname = hostname;
@@ -610,7 +611,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
     ThriftTransportPool.getInstance().setIdleTime(aconf.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT));
     tserverSet = new LiveTServerSet(this, this);
     this.tabletBalancer = aconf.instantiateClassProperty(Property.MASTER_TABLET_BALANCER, TabletBalancer.class, new DefaultLoadBalancer());
-    this.tabletBalancer.init(serverConfig);
+    this.tabletBalancer.init(new AccumuloServerContext(instance, serverConfig));
 
     try {
       AccumuloVFSClassLoader.getContextManager().setContextConfig(new ContextManager.DefaultContextsConfig(new Iterable<Entry<String,String>>() {
@@ -1443,10 +1444,11 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List
       ServerOpts opts = new ServerOpts();
       opts.parseArgs(app, args);
       String hostname = opts.getAddress();
-      ServerConfigurationFactory conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance());
+      Instance instance = HdfsZooInstance.getInstance();
+      ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
       VolumeManager fs = VolumeManagerImpl.get();
-      Accumulo.init(fs, conf, app);
-      Master master = new Master(conf, fs, hostname);
+      Accumulo.init(fs, instance, conf, app);
+      Master master = new Master(instance, conf, fs, hostname);
       DistributedTrace.enable(hostname, app, conf.getSystemConfiguration());
       master.run();
     } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
index 7b397b2..0f2e232 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
@@ -78,6 +78,7 @@ import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator;
 import org.apache.accumulo.master.tableOps.TraceRepo;
 import org.apache.accumulo.master.tserverOps.ShutdownTServer;
+import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.client.ClientServiceHandler;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
@@ -465,7 +466,7 @@ public class MasterClientServiceHandler extends FateServiceHandler implements Ma
     if (property.equals(Property.MASTER_TABLET_BALANCER.getKey())) {
       TabletBalancer balancer = master.getConfiguration().instantiateClassProperty(Property.MASTER_TABLET_BALANCER, TabletBalancer.class,
           new DefaultLoadBalancer());
-      balancer.init(master.getConfigurationFactory());
+      balancer.init(new AccumuloServerContext(instance, master.getConfigurationFactory()));
       master.tabletBalancer = balancer;
       log.info("tablet balancer changed to " + master.tabletBalancer.getClass().getName());
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index 3b5eab1..5b1da60 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -412,7 +412,7 @@ public class Monitor implements HighlyAvailableService {
       if (locks != null && locks.size() > 0) {
         Collections.sort(locks);
         address = new ServerServices(new String(zk.getData(path + "/" + locks.get(0), null), UTF_8)).getAddress(Service.GC_CLIENT);
-        GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, new AccumuloServerContext(config));
+        GCMonitorService.Client client = ThriftUtil.getClient(new GCMonitorService.Client.Factory(), address, new AccumuloServerContext(instance, config));
         try {
           result = client.getStatus(Tracer.traceInfo(), getContext().rpcCreds());
         } finally {
@@ -436,10 +436,10 @@ public class Monitor implements HighlyAvailableService {
     VolumeManager fs = VolumeManagerImpl.get();
     instance = HdfsZooInstance.getInstance();
     config = new ServerConfigurationFactory(instance);
-    context = new AccumuloServerContext(config);
+    context = new AccumuloServerContext(instance, config);
     log.info("Version " + Constants.VERSION);
     log.info("Instance " + instance.getInstanceID());
-    Accumulo.init(fs, config, app);
+    Accumulo.init(fs, instance, config, app);
     Monitor monitor = new Monitor();
     // Servlets need access to limit requests when the monitor is not active, but Servlets are instantiated
     // via reflection. Expose the service this way instead.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
index 2ad1b9d..07c0e38 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
@@ -88,6 +88,7 @@ public class TraceServer implements Watcher {
 
   final private static Logger log = LoggerFactory.getLogger(TraceServer.class);
   final private ServerConfigurationFactory serverConfiguration;
+  final private Instance instance;
   final private TServer server;
   final private AtomicReference<BatchWriter> writer;
   final private Connector connector;
@@ -182,10 +183,11 @@ public class TraceServer implements Watcher {
 
   }
 
-  public TraceServer(ServerConfigurationFactory serverConfiguration, String hostname) throws Exception {
+  public TraceServer(Instance instance, ServerConfigurationFactory serverConfiguration, String hostname) throws Exception {
     this.serverConfiguration = serverConfiguration;
-    log.info("Version " + Constants.VERSION);
-    log.info("Instance " + serverConfiguration.getInstance().getInstanceID());
+    this.instance = instance;
+    log.info("Version {}", Constants.VERSION);
+    log.info("Instance {}", instance.getInstanceID());
     AccumuloConfiguration conf = serverConfiguration.getSystemConfiguration();
     tableName = conf.get(Property.TRACE_TABLE);
     connector = ensureTraceTableExists(conf);
@@ -260,7 +262,7 @@ public class TraceServer implements Watcher {
           at = token;
         }
 
-        connector = serverConfiguration.getInstance().getConnector(principal, at);
+        connector = instance.getConnector(principal, at);
         if (!connector.tableOperations().exists(tableName)) {
           connector.tableOperations().create(tableName);
           IteratorSetting setting = new IteratorSetting(10, "ageoff", AgeOffFilter.class.getName());
@@ -384,9 +386,9 @@ public class TraceServer implements Watcher {
     Instance instance = HdfsZooInstance.getInstance();
     ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
     VolumeManager fs = VolumeManagerImpl.get();
-    Accumulo.init(fs, conf, app);
+    Accumulo.init(fs, instance, conf, app);
     String hostname = opts.getAddress();
-    TraceServer server = new TraceServer(conf, hostname);
+    TraceServer server = new TraceServer(instance, conf, hostname);
     try {
       server.run();
     } finally {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 466c19f..64e3bcd 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -345,12 +345,11 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
   private final ZooAuthenticationKeyWatcher authKeyWatcher;
   private final WalStateManager walMarker;
 
-  public TabletServer(ServerConfigurationFactory confFactory, VolumeManager fs) throws IOException {
-    super(confFactory);
+  public TabletServer(Instance instance, ServerConfigurationFactory confFactory, VolumeManager fs) throws IOException {
+    super(instance, confFactory);
     this.confFactory = confFactory;
     this.fs = fs;
     final AccumuloConfiguration aconf = getConfiguration();
-    Instance instance = getInstance();
     log.info("Version " + Constants.VERSION);
     log.info("Instance " + instance.getInstanceID());
     this.sessionManager = new SessionManager(aconf);
@@ -3064,10 +3063,11 @@ public class TabletServer extends AccumuloServerContext implements Runnable {
       ServerOpts opts = new ServerOpts();
       opts.parseArgs(app, args);
       String hostname = opts.getAddress();
-      ServerConfigurationFactory conf = new ServerConfigurationFactory(HdfsZooInstance.getInstance());
+      Instance instance = HdfsZooInstance.getInstance();
+      ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
       VolumeManager fs = VolumeManagerImpl.get();
-      Accumulo.init(fs, conf, app);
-      final TabletServer server = new TabletServer(conf, fs);
+      Accumulo.init(fs, instance, conf, app);
+      final TabletServer server = new TabletServer(instance, conf, fs);
       server.config(hostname);
       DistributedTrace.enable(hostname, app, conf.getSystemConfiguration());
       if (UserGroupInformation.isSecurityEnabled()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/server/tserver/src/test/java/org/apache/accumulo/tserver/LargestFirstMemoryManagerTest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/LargestFirstMemoryManagerTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/LargestFirstMemoryManagerTest.java
index 47c763b..1c68e82 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/LargestFirstMemoryManagerTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/LargestFirstMemoryManagerTest.java
@@ -79,10 +79,6 @@ public class LargestFirstMemoryManagerTest {
         return delegate.getNamespaceConfiguration(namespaceId);
       }
 
-      @Override
-      public Instance getInstance() {
-        return delegate.getInstance();
-      }
     };
     mgr.init(config);
     MemoryManagementActions result;
@@ -194,10 +190,6 @@ public class LargestFirstMemoryManagerTest {
         return delegate.getNamespaceConfiguration(namespaceId);
       }
 
-      @Override
-      public Instance getInstance() {
-        return delegate.getInstance();
-      }
     };
     mgr.init(config);
     MemoryManagementActions result;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/shell/src/main/java/org/apache/accumulo/shell/commands/ListBulkCommand.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ListBulkCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ListBulkCommand.java
index 6f2e01e..77c39ff 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ListBulkCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ListBulkCommand.java
@@ -23,6 +23,7 @@ import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.MasterClient;
 import org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
@@ -52,7 +53,8 @@ public class ListBulkCommand extends Command {
 
     MasterMonitorInfo stats;
     MasterClientService.Iface client = null;
-    AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(shellState.getInstance()));
+    Instance instance = shellState.getInstance();
+    AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(instance));
     while (true) {
       try {
         client = MasterClient.getConnectionWithRetry(context);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
index 5403b5f..d826b80 100644
--- a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
+++ b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
@@ -23,6 +23,7 @@ import java.util.Date;
 import java.util.Map.Entry;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.MasterClient;
 import org.apache.accumulo.core.client.impl.thrift.ThriftNotActiveServiceException;
 import org.apache.accumulo.core.master.thrift.BulkImportStatus;
@@ -42,7 +43,8 @@ public class GetMasterStats {
   public static void main(String[] args) throws Exception {
     MasterClientService.Iface client = null;
     MasterMonitorInfo stats = null;
-    AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance()));
+    Instance instance = HdfsZooInstance.getInstance();
+    AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(instance));
     while (true) {
       try {
         client = MasterClient.getConnectionWithRetry(context);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java b/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
index be800ad..8d2b52f 100644
--- a/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java
@@ -119,7 +119,7 @@ public class TotalQueuedIT extends ConfigurableMacBase {
   private long getSyncs() throws Exception {
     Connector c = getConnector();
     ServerConfigurationFactory confFactory = new ServerConfigurationFactory(c.getInstance());
-    AccumuloServerContext context = new AccumuloServerContext(confFactory);
+    AccumuloServerContext context = new AccumuloServerContext(c.getInstance(), confFactory);
     for (String address : c.instanceOperations().getTabletServers()) {
       TabletClientService.Client client = ThriftUtil.getTServerClient(HostAndPort.fromString(address), context);
       TabletServerStatus status = client.getTabletServerStatus(null, context.rpcCreds());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java b/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
index a8fc439..80f015a 100644
--- a/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
+++ b/test/src/main/java/org/apache/accumulo/test/WrongTabletTest.java
@@ -48,7 +48,7 @@ public class WrongTabletTest {
     final HostAndPort location = HostAndPort.fromString(opts.location);
     final Instance inst = opts.getInstance();
     final ServerConfigurationFactory conf = new ServerConfigurationFactory(inst);
-    final ClientContext context = new AccumuloServerContext(conf) {
+    final ClientContext context = new AccumuloServerContext(inst, conf) {
       @Override
       public synchronized Credentials getCredentials() {
         try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
index 7010dc9..70e8901 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java
@@ -82,7 +82,7 @@ public class SplitRecoveryIT extends ConfigurableMacBase {
 
   private void run() throws Exception {
     Instance inst = HdfsZooInstance.getInstance();
-    AccumuloServerContext c = new AccumuloServerContext(new ServerConfigurationFactory(inst));
+    AccumuloServerContext c = new AccumuloServerContext(inst, new ServerConfigurationFactory(inst));
     String zPath = ZooUtil.getRoot(inst) + "/testLock";
     IZooReaderWriter zoo = ZooReaderWriter.getInstance();
     zoo.putPersistentData(zPath, new byte[0], NodeExistsPolicy.OVERWRITE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
index 14d594a..b1f4924 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
@@ -24,6 +24,7 @@ import java.util.Random;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.security.thrift.TCredentials;
@@ -99,7 +100,8 @@ public class ZombieTServer {
   public static void main(String[] args) throws Exception {
     Random random = new Random(System.currentTimeMillis() % 1000);
     int port = random.nextInt(30000) + 2000;
-    AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance()));
+    Instance instance = HdfsZooInstance.getInstance();
+    AccumuloServerContext context = new AccumuloServerContext(instance, new ServerConfigurationFactory(instance));
 
     TransactionWatcher watcher = new TransactionWatcher();
     final ThriftClientHandler tch = new ThriftClientHandler(context, watcher);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java b/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
index 61b8232..32a7e6f 100644
--- a/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/gc/replication/CloseWriteAheadLogReferencesIT.java
@@ -95,7 +95,6 @@ public class CloseWriteAheadLogReferencesIT extends ConfigurableMacBase {
     final AccumuloConfiguration systemConf = new ConfigurationCopy(new HashMap<String,String>());
     ServerConfigurationFactory factory = createMock(ServerConfigurationFactory.class);
     expect(factory.getSystemConfiguration()).andReturn(systemConf).anyTimes();
-    expect(factory.getInstance()).andReturn(mockInst).anyTimes();
     expect(factory.getSiteConfiguration()).andReturn(siteConfig).anyTimes();
 
     // Just make the SiteConfiguration delegate to our AccumuloConfiguration
@@ -123,7 +122,7 @@ public class CloseWriteAheadLogReferencesIT extends ConfigurableMacBase {
     }).anyTimes();
 
     replay(mockInst, factory, siteConfig);
-    refs = new WrappedCloseWriteAheadLogReferences(new AccumuloServerContext(factory));
+    refs = new WrappedCloseWriteAheadLogReferences(new AccumuloServerContext(mockInst, factory));
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/abca21b6/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
index 299b0b8..08658cd 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
@@ -28,6 +28,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.client.ClientConfiguration;
+import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
@@ -142,8 +143,8 @@ public class NullTserver {
 
     @Override
     public InitialMultiScan startMultiScan(TInfo tinfo, TCredentials credentials, Map<TKeyExtent,List<TRange>> batch, List<TColumn> columns,
-        List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration tsc, long batchTimeOut,
-        String context) {
+        List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer> authorizations, boolean waitForWrites, TSamplerConfiguration tsc,
+        long batchTimeOut, String context) {
       return null;
     }
 
@@ -184,7 +185,8 @@ public class NullTserver {
     public void loadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent) throws TException {}
 
     @Override
-    public void unloadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent, TUnloadTabletGoal goal, long requestTime) throws TException {}
+    public void unloadTablet(TInfo tinfo, TCredentials credentials, String lock, TKeyExtent extent, TUnloadTabletGoal goal, long requestTime)
+        throws TException {}
 
     @Override
     public List<ActiveScan> getActiveScans(TInfo tinfo, TCredentials credentials) throws ThriftSecurityException, TException {
@@ -238,7 +240,7 @@ public class NullTserver {
     }
 
     @Override
-    public void removeLogs(TInfo tinfo, TCredentials credentials, List<String> filenames) throws TException { }
+    public void removeLogs(TInfo tinfo, TCredentials credentials, List<String> filenames) throws TException {}
 
     @Override
     public TSummaries startGetSummaries(TInfo tinfo, TCredentials credentials, TSummaryRequest request)
@@ -281,13 +283,14 @@ public class NullTserver {
 
     // modify metadata
     ZooKeeperInstance zki = new ZooKeeperInstance(new ClientConfiguration().withInstance(opts.iname).withZkHosts(opts.keepers));
-    AccumuloServerContext context = new AccumuloServerContext(new ServerConfigurationFactory(zki));
+    Instance inst = HdfsZooInstance.getInstance();
+    AccumuloServerContext context = new AccumuloServerContext(inst, new ServerConfigurationFactory(zki));
 
     TransactionWatcher watcher = new TransactionWatcher();
-    ThriftClientHandler tch = new ThriftClientHandler(new AccumuloServerContext(new ServerConfigurationFactory(HdfsZooInstance.getInstance())), watcher);
+    ThriftClientHandler tch = new ThriftClientHandler(new AccumuloServerContext(inst, new ServerConfigurationFactory(inst)), watcher);
     Processor<Iface> processor = new Processor<>(tch);
-    TServerUtils.startTServer(context.getConfiguration(), ThriftServerType.CUSTOM_HS_HA, processor, "NullTServer",
-        "null tserver", 2, 1, 1000, 10 * 1024 * 1024, null, null, -1, HostAndPort.fromParts("0.0.0.0", opts.port));
+    TServerUtils.startTServer(context.getConfiguration(), ThriftServerType.CUSTOM_HS_HA, processor, "NullTServer", "null tserver", 2, 1, 1000, 10 * 1024 * 1024,
+        null, null, -1, HostAndPort.fromParts("0.0.0.0", opts.port));
 
     HostAndPort addr = HostAndPort.fromParts(InetAddress.getLocalHost().getHostName(), opts.port);
 


Mime
View raw message