accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [2/2] git commit: ACCUMULO-3019 clean up the warnings concerning ServerConfiguration
Date Wed, 30 Jul 2014 21:24:11 GMT
ACCUMULO-3019 clean up the warnings concerning ServerConfiguration


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

Branch: refs/heads/master
Commit: c8b3e995e9627455fae66120a0b48157d1d5f4d0
Parents: cfb9898
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Jul 30 17:07:03 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Jul 30 17:07:27 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/conf/SiteConfiguration.java   |  4 +
 .../org/apache/accumulo/server/Accumulo.java    |  8 +-
 .../apache/accumulo/server/ServerConstants.java |  8 +-
 .../accumulo/server/client/BulkImporter.java    | 25 +++---
 .../server/client/ClientServiceHandler.java     | 25 +++---
 .../accumulo/server/client/HdfsZooInstance.java | 13 ++--
 .../accumulo/server/conf/ConfigSanityCheck.java |  2 +-
 .../server/conf/ServerConfiguration.java        | 82 ++------------------
 .../server/conf/ServerConfigurationFactory.java |  2 +-
 .../accumulo/server/fs/VolumeManagerImpl.java   |  4 +-
 .../apache/accumulo/server/init/Initialize.java | 23 +++---
 .../master/balancer/ChaoticLoadBalancer.java    |  8 +-
 .../server/master/balancer/TabletBalancer.java  | 11 ++-
 .../server/security/SecurityOperation.java      | 10 +--
 .../server/security/SystemCredentials.java      |  4 +-
 .../org/apache/accumulo/server/util/Admin.java  |  9 ++-
 .../accumulo/server/util/ListInstances.java     |  4 +-
 .../accumulo/server/util/LoginProperties.java   |  4 +-
 .../server/util/VerifyTabletAssignments.java    |  6 +-
 .../server/zookeeper/ZooReaderWriter.java       |  4 +-
 .../zookeeper/ZooReaderWriterFactory.java       |  4 +-
 .../gc/GarbageCollectWriteAheadLogs.java        |  4 +-
 .../accumulo/gc/SimpleGarbageCollector.java     | 13 ++--
 .../java/org/apache/accumulo/master/Master.java | 31 ++++----
 .../master/MasterClientServiceHandler.java      |  9 ++-
 .../master/recovery/RecoveryManager.java        |  8 +-
 .../master/replication/ReplicationDriver.java   |  2 +-
 .../accumulo/master/replication/WorkDriver.java |  2 +-
 .../accumulo/master/replication/WorkMaker.java  |  5 +-
 .../accumulo/master/state/SetGoalState.java     |  4 +-
 .../accumulo/master/tableOps/BulkImport.java    | 11 ++-
 .../accumulo/master/tableOps/ExportTable.java   |  4 +-
 .../org/apache/accumulo/monitor/Monitor.java    |  9 ++-
 .../accumulo/monitor/ZooKeeperStatus.java       |  4 +-
 .../monitor/servlets/DefaultServlet.java        |  6 +-
 .../monitor/servlets/ReplicationServlet.java    |  4 +-
 .../org/apache/accumulo/tracer/TraceServer.java | 11 +--
 .../tserver/BulkFailedCopyProcessor.java        |  6 +-
 .../apache/accumulo/tserver/FileManager.java    |  6 +-
 .../apache/accumulo/tserver/InMemoryMap.java    |  6 +-
 .../apache/accumulo/tserver/TabletServer.java   | 71 ++++++++---------
 .../tserver/TabletServerResourceManager.java    |  6 +-
 .../accumulo/tserver/log/LocalWALRecovery.java  |  3 +-
 .../accumulo/tserver/logger/LogReader.java      |  4 +-
 .../replication/AccumuloReplicaSystem.java      |  4 +-
 .../replication/ReplicationProcessor.java       |  4 +-
 .../replication/ReplicationServicerHandler.java |  4 +-
 .../apache/accumulo/tserver/tablet/Tablet.java  | 14 ++--
 .../LargestFirstMemoryManagerTest.java          | 45 ++---------
 .../tserver/log/TestUpgradePathForWALogs.java   |  6 +-
 .../shell/commands/AddAuthsCommand.java         |  3 +-
 .../accumulo/shell/commands/ConfigCommand.java  |  5 +-
 .../shell/commands/ConstraintCommand.java       |  3 +-
 .../accumulo/shell/commands/DUCommand.java      |  7 +-
 .../shell/commands/ExportTableCommand.java      |  3 +-
 .../shell/commands/GetAuthsCommand.java         |  3 +-
 .../accumulo/shell/commands/GrantCommand.java   |  5 +-
 .../apache/accumulo/shell/commands/OptUtil.java | 13 ++--
 .../accumulo/shell/commands/PasswdCommand.java  |  3 +-
 .../accumulo/shell/commands/RevokeCommand.java  |  5 +-
 .../shell/commands/SetAuthsCommand.java         |  3 +-
 .../accumulo/shell/commands/TableOperation.java |  5 +-
 .../shell/commands/UserPermissionsCommand.java  |  3 +-
 .../apache/accumulo/test/WrongTabletTest.java   |  4 +-
 .../performance/scan/CollectTabletStats.java    |  6 +-
 .../accumulo/test/functional/BulkFileIT.java    |  4 +-
 66 files changed, 292 insertions(+), 349 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
index 9875cdb..3696c0d 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
@@ -63,6 +63,10 @@ public class SiteConfiguration extends AccumuloConfiguration {
     return instance;
   }
   
+  synchronized public static SiteConfiguration getInstance() {
+    return getInstance(DefaultConfiguration.getInstance());
+  }
+
   synchronized private static Configuration getXmlConfig() {
     String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml");
     if (xmlConfig == null) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 43493fe..3235559 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
@@ -27,8 +27,8 @@ import java.util.Map.Entry;
 import java.util.TreeMap;
 
 import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.trace.DistributedTrace;
 import org.apache.accumulo.core.util.AddressUtil;
@@ -36,11 +36,11 @@ import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.util.Version;
 import org.apache.accumulo.core.volume.Volume;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.ReadOnlyTStore;
 import org.apache.accumulo.fate.ReadOnlyStore;
+import org.apache.accumulo.fate.ReadOnlyTStore;
 import org.apache.accumulo.fate.ZooStore;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.accumulo.server.watcher.MonitorLog4jWatcher;
@@ -141,7 +141,7 @@ public class Accumulo {
     return defaultConfigFile;
   }
 
-  public static void init(VolumeManager fs, ServerConfiguration config, String application) throws UnknownHostException {
+  public static void init(VolumeManager fs, ServerConfigurationFactory config, String application) throws UnknownHostException {
     
     System.setProperty("org.apache.accumulo.core.application", application);
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
index b577abb..4475c8f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/ServerConstants.java
@@ -24,13 +24,13 @@ import java.util.HashSet;
 import java.util.List;
 
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.volume.Volume;
 import org.apache.accumulo.core.volume.VolumeConfiguration;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeUtil;
 import org.apache.hadoop.fs.Path;
 
@@ -59,7 +59,7 @@ public class ServerConstants {
   // these are functions to delay loading the Accumulo configuration unless we must
   public static synchronized String[] getBaseUris() {
     if (baseUris == null) {
-      baseUris = checkBaseUris(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration()), false);
+      baseUris = checkBaseUris(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()), false);
     }
 
     return baseUris;
@@ -76,7 +76,7 @@ public class ServerConstants {
       String currentIid;
       Integer currentVersion;
       try {
-        currentIid = ZooUtil.getInstanceIDFromHdfs(path, ServerConfiguration.getSiteConfiguration());
+        currentIid = ZooUtil.getInstanceIDFromHdfs(path, SiteConfiguration.getInstance());
         Path vpath = new Path(baseDir, VERSION_DIR);
         currentVersion = Accumulo.getAccumuloPersistentVersion(vpath.getFileSystem(CachedConfiguration.getInstance()), vpath);
       } catch (Exception e) {
@@ -149,7 +149,7 @@ public class ServerConstants {
   public static synchronized List<Pair<Path,Path>> getVolumeReplacements() {
 
     if (replacementsList == null) {
-      String replacements = ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_VOLUMES_REPLACEMENTS);
+      String replacements = SiteConfiguration.getInstance().get(Property.INSTANCE_VOLUMES_REPLACEMENTS);
 
       replacements = replacements.trim();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
index 6ff5774..7097079 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
@@ -60,7 +60,7 @@ import org.apache.accumulo.core.util.NamingThreadFactory;
 import org.apache.accumulo.core.util.StopWatch;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.util.FileUtil;
@@ -114,6 +114,7 @@ public class BulkImporter {
     
     int numThreads = acuConf.getCount(Property.TSERV_BULK_PROCESS_THREADS);
     int numAssignThreads = acuConf.getCount(Property.TSERV_BULK_ASSIGNMENT_THREADS);
+    final ServerConfigurationFactory confFactory = new ServerConfigurationFactory(instance);
     
     timer = new StopWatch<Timers>(Timers.class);
     timer.start(Timers.TOTAL);
@@ -146,7 +147,7 @@ public class BulkImporter {
           public void run() {
             List<TabletLocation> tabletsToAssignMapFileTo = Collections.emptyList();
             try {
-              tabletsToAssignMapFileTo = findOverlappingTablets(ServerConfiguration.getSystemConfiguration(instance), fs, locator, mapFile, credentials);
+              tabletsToAssignMapFileTo = findOverlappingTablets(confFactory.getConfiguration(), fs, locator, mapFile, credentials);
             } catch (Exception ex) {
               log.warn("Unable to find tablets that overlap file " + mapFile.toString());
             }
@@ -209,7 +210,7 @@ public class BulkImporter {
             
             try {
               timer.start(Timers.QUERY_METADATA);
-              tabletsToAssignMapFileTo.addAll(findOverlappingTablets(ServerConfiguration.getSystemConfiguration(instance), fs, locator, entry.getKey(), ke,
+              tabletsToAssignMapFileTo.addAll(findOverlappingTablets(confFactory.getConfiguration(), fs, locator, entry.getKey(), ke,
                   credentials));
               timer.stop(Timers.QUERY_METADATA);
               keListIter.remove();
@@ -430,7 +431,7 @@ public class BulkImporter {
     Map<Path,List<KeyExtent>> ret;
     
     timer.start(Timers.IMPORT_MAP_FILES);
-    ret = assignMapFiles(credentials, tableId, assignInfo, locationsOf(assignments), numThreads);
+    ret = assignMapFiles(acuConf, credentials, tableId, assignInfo, locationsOf(assignments), numThreads);
     timer.stop(Timers.IMPORT_MAP_FILES);
     
     return ret;
@@ -441,9 +442,11 @@ public class BulkImporter {
     String location;
     Credentials credentials;
     private Map<KeyExtent,List<PathSize>> assignmentsPerTablet;
+    private final AccumuloConfiguration acuConf;
     
-    public AssignmentTask(Credentials credentials, Map<Path,List<KeyExtent>> assignmentFailures, String tableName, String location,
+    public AssignmentTask(AccumuloConfiguration acuConf, Credentials credentials, Map<Path,List<KeyExtent>> assignmentFailures, String tableName, String location,
         Map<KeyExtent,List<PathSize>> assignmentsPerTablet) {
+      this.acuConf = acuConf;
       this.assignmentFailures = assignmentFailures;
       this.location = location;
       this.assignmentsPerTablet = assignmentsPerTablet;
@@ -479,7 +482,7 @@ public class BulkImporter {
       log.debug("Assigning " + uniqMapFiles.size() + " map files to " + assignmentsPerTablet.size() + " tablets at " + location);
       
       try {
-        List<KeyExtent> failures = assignMapFiles(credentials, location, assignmentsPerTablet);
+        List<KeyExtent> failures = assignMapFiles(acuConf, credentials, location, assignmentsPerTablet);
         handleFailures(failures, "Not Serving Tablet");
       } catch (AccumuloException e) {
         handleFailures(assignmentsPerTablet.keySet(), e.getMessage());
@@ -505,7 +508,7 @@ public class BulkImporter {
     }
   }
   
-  private Map<Path,List<KeyExtent>> assignMapFiles(Credentials credentials, String tableName, Map<Path,List<AssignmentInfo>> assignments,
+  private Map<Path,List<KeyExtent>> assignMapFiles(AccumuloConfiguration acuConf, Credentials credentials, String tableName, Map<Path,List<AssignmentInfo>> assignments,
       Map<KeyExtent,String> locations, int numThreads) {
     
     // group assignments by tablet
@@ -566,7 +569,7 @@ public class BulkImporter {
     
     for (Entry<String,Map<KeyExtent,List<PathSize>>> entry : assignmentsPerTabletServer.entrySet()) {
       String location = entry.getKey();
-      threadPool.submit(new AssignmentTask(credentials, assignmentFailures, tableName, location, entry.getValue()));
+      threadPool.submit(new AssignmentTask(acuConf, credentials, assignmentFailures, tableName, location, entry.getValue()));
     }
     
     threadPool.shutdown();
@@ -583,11 +586,11 @@ public class BulkImporter {
     return assignmentFailures;
   }
   
-  private List<KeyExtent> assignMapFiles(Credentials credentials, String location, Map<KeyExtent,List<PathSize>> assignmentsPerTablet)
+  private List<KeyExtent> assignMapFiles(AccumuloConfiguration acuConf, Credentials credentials, String location, Map<KeyExtent,List<PathSize>> assignmentsPerTablet)
       throws AccumuloException, AccumuloSecurityException {
     try {
-      long timeInMillis = ServerConfiguration.getSystemConfiguration(instance).getTimeInMillis(Property.TSERV_BULK_TIMEOUT);
-      TabletClientService.Iface client = ThriftUtil.getTServerClient(location, ServerConfiguration.getSystemConfiguration(instance), timeInMillis);
+      long timeInMillis = acuConf.getTimeInMillis(Property.TSERV_BULK_TIMEOUT);
+      TabletClientService.Iface client = ThriftUtil.getTServerClient(location, acuConf, timeInMillis);
       try {
         HashMap<KeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>> files = new HashMap<KeyExtent,Map<String,org.apache.accumulo.core.data.thrift.MapFileInfo>>();
         for (Entry<KeyExtent,List<PathSize>> entry : assignmentsPerTablet.entrySet()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
index ebea064..83d02db 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
@@ -54,7 +54,7 @@ import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
@@ -253,13 +253,14 @@ public class ClientServiceHandler implements ClientService.Iface {
 
   @Override
   public Map<String,String> getConfiguration(TInfo tinfo, TCredentials credentials, ConfigurationType type) throws TException {
+    ServerConfigurationFactory factory = new ServerConfigurationFactory(instance);
     switch (type) {
       case CURRENT:
-        return conf(credentials, new ServerConfiguration(instance).getConfiguration());
+        return conf(credentials, factory.getConfiguration());
       case SITE:
-        return conf(credentials, ServerConfiguration.getSiteConfiguration());
+        return conf(credentials, factory.getSiteConfiguration());
       case DEFAULT:
-        return conf(credentials, AccumuloConfiguration.getDefaultConfiguration());
+        return conf(credentials, factory.getDefaultConfiguration());
     }
     throw new RuntimeException("Unexpected configuration type " + type);
   }
@@ -267,7 +268,7 @@ public class ClientServiceHandler implements ClientService.Iface {
   @Override
   public Map<String,String> getTableConfiguration(TInfo tinfo, TCredentials credentials, String tableName) throws TException, ThriftTableOperationException {
     String tableId = checkTableId(instance, tableName, null);
-    AccumuloConfiguration config = ServerConfiguration.getTableConfiguration(instance, tableId);
+    AccumuloConfiguration config = new ServerConfigurationFactory(instance).getTableConfiguration(tableId);
     return conf(credentials, config);
   }
 
@@ -280,7 +281,7 @@ public class ClientServiceHandler implements ClientService.Iface {
       return transactionWatcher.run(Constants.BULK_ARBITRATOR_TYPE, tid, new Callable<List<String>>() {
         @Override
         public List<String> call() throws Exception {
-          return BulkImporter.bulkLoad(new ServerConfiguration(instance).getConfiguration(), instance, Credentials.fromThrift(credentials), tid, tableId, files, errorDir, setTime);
+          return BulkImporter.bulkLoad(new ServerConfigurationFactory(instance).getConfiguration(), instance, Credentials.fromThrift(credentials), tid, tableId, files, errorDir, setTime);
         }
       });
     } catch (AccumuloSecurityException e) {
@@ -335,9 +336,9 @@ public class ClientServiceHandler implements ClientService.Iface {
     try {
       shouldMatch = loader.loadClass(interfaceMatch);
 
-      new ServerConfiguration(instance).getTableConfiguration(tableId);
+      AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getTableConfiguration(tableId);
 
-      String context = new ServerConfiguration(instance).getTableConfiguration(tableId).get(Property.TABLE_CLASSPATH);
+      String context = conf.get(Property.TABLE_CLASSPATH);
 
       ClassLoader currentLoader;
 
@@ -369,9 +370,9 @@ public class ClientServiceHandler implements ClientService.Iface {
     try {
       shouldMatch = loader.loadClass(interfaceMatch);
 
-      new ServerConfiguration(instance).getNamespaceConfiguration(namespaceId);
+      AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getNamespaceConfiguration(namespaceId);
 
-      String context = new ServerConfiguration(instance).getNamespaceConfiguration(namespaceId).get(Property.TABLE_CLASSPATH);
+      String context = conf.get(Property.TABLE_CLASSPATH);
 
       ClassLoader currentLoader;
 
@@ -408,7 +409,7 @@ public class ClientServiceHandler implements ClientService.Iface {
       }
 
       // use the same set of tableIds that were validated above to avoid race conditions
-      Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(new ServerConfiguration(instance).getConfiguration(), tableIds, fs, conn);
+      Map<TreeSet<String>,Long> diskUsage = TableDiskUsage.getDiskUsage(new ServerConfigurationFactory(instance).getConfiguration(), tableIds, fs, conn);
       List<TDiskUsage> retUsages = new ArrayList<TDiskUsage>();
       for (Map.Entry<TreeSet<String>,Long> usageItem : diskUsage.entrySet()) {
         retUsages.add(new TDiskUsage(new ArrayList<String>(usageItem.getKey()), usageItem.getValue()));
@@ -433,7 +434,7 @@ public class ClientServiceHandler implements ClientService.Iface {
       String why = "Could not find namespace while getting configuration.";
       throw new ThriftTableOperationException(null, ns, null, TableOperationExceptionType.NAMESPACE_NOTFOUND, why);
     }
-    AccumuloConfiguration config = ServerConfiguration.getNamespaceConfiguration(instance, namespaceId);
+    AccumuloConfiguration config = new ServerConfigurationFactory(instance).getNamespaceConfiguration(namespaceId);
     return conf(credentials, config);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java b/server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
index 3199e0a..050a31a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
@@ -34,6 +34,7 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.util.ByteBufferUtil;
@@ -43,7 +44,7 @@ import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
 import org.apache.accumulo.server.Accumulo;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.zookeeper.ZooLock;
@@ -61,7 +62,7 @@ import com.google.common.base.Joiner;
 public class HdfsZooInstance implements Instance {
 
   private HdfsZooInstance() {
-    AccumuloConfiguration acuConf = ServerConfiguration.getSiteConfiguration();
+    AccumuloConfiguration acuConf = SiteConfiguration.getInstance();
     zooCache = new ZooCacheFactory().getZooCache(acuConf.get(Property.INSTANCE_ZK_HOST), (int) acuConf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
   }
 
@@ -121,7 +122,7 @@ public class HdfsZooInstance implements Instance {
 
   private static synchronized void _getInstanceID() {
     if (instanceId == null) {
-      AccumuloConfiguration acuConf = ServerConfiguration.getSiteConfiguration();
+      AccumuloConfiguration acuConf = SiteConfiguration.getInstance();
       // InstanceID should be the same across all volumes, so just choose one
       VolumeManager fs;
       try {
@@ -143,12 +144,12 @@ public class HdfsZooInstance implements Instance {
 
   @Override
   public String getZooKeepers() {
-    return ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST);
+    return SiteConfiguration.getInstance().get(Property.INSTANCE_ZK_HOST);
   }
 
   @Override
   public int getZooKeepersSessionTimeOut() {
-    return (int) ServerConfiguration.getSiteConfiguration().getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
+    return (int) SiteConfiguration.getInstance().getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
   }
 
   @Override
@@ -180,7 +181,7 @@ public class HdfsZooInstance implements Instance {
   @Override
   public AccumuloConfiguration getConfiguration() {
     if (conf == null)
-      conf = new ServerConfiguration(this).getConfiguration();
+      conf = new ServerConfigurationFactory(this).getConfiguration();
     return conf;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/conf/ConfigSanityCheck.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ConfigSanityCheck.java b/server/base/src/main/java/org/apache/accumulo/server/conf/ConfigSanityCheck.java
index 05806ca..b90051f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ConfigSanityCheck.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ConfigSanityCheck.java
@@ -21,7 +21,7 @@ import org.apache.accumulo.server.client.HdfsZooInstance;
 public class ConfigSanityCheck {
   
   public static void main(String[] args) {
-    new ServerConfiguration(HdfsZooInstance.getInstance()).getConfiguration();
+    new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration();
   }
   
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 0793177..342aebe 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,86 +16,20 @@
  */
 package org.apache.accumulo.server.conf;
 
-import java.security.SecurityPermission;
-
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
-import org.apache.accumulo.core.conf.DefaultConfiguration;
-import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.KeyExtent;
 
-/**
- * @deprecated Use {@link ServerConfigurationFactory} instead.
- */
-@Deprecated
-public class ServerConfiguration {
-
-  private static SecurityPermission CONFIGURATION_PERMISSION = new SecurityPermission("configurationPermission");
-
-  public static synchronized SiteConfiguration getSiteConfiguration() {
-    checkPermissions();
-    return SiteConfiguration.getInstance(getDefaultConfiguration());
-  }
-
-  private static void checkPermissions() {
-    SecurityManager sm = System.getSecurityManager();
-    if (sm != null) {
-      sm.checkPermission(CONFIGURATION_PERMISSION);
-    }
-  }
-
-  private static synchronized ZooConfiguration getZooConfiguration(Instance instance) {
-    return (ZooConfiguration) new ServerConfigurationFactory(instance).getConfiguration();
-  }
-
-  public static synchronized DefaultConfiguration getDefaultConfiguration() {
-    checkPermissions();
-    return DefaultConfiguration.getInstance();
-  }
-
-  public static synchronized AccumuloConfiguration getSystemConfiguration(Instance instance) {
-    return getZooConfiguration(instance);
-  }
-
-  public static NamespaceConfiguration getNamespaceConfigurationForTable(Instance instance, String tableId) {
-    return new ServerConfigurationFactory(instance).getNamespaceConfigurationForTable(tableId);
-  }
-
-  public static NamespaceConfiguration getNamespaceConfiguration(Instance instance, String namespaceId) {
-    return new ServerConfigurationFactory(instance).getNamespaceConfiguration(namespaceId);
-  }
-
-  public static TableConfiguration getTableConfiguration(Instance instance, String tableId) {
-    return new ServerConfigurationFactory(instance).getTableConfiguration(tableId);
-  }
-
-  static void expireAllTableObservers() {
-    ServerConfigurationFactory.expireAllTableObservers();
-  }
-  private final ServerConfigurationFactory scf;
-
-  public ServerConfiguration(Instance instance) {
-    scf = new ServerConfigurationFactory(instance);
-  }
-
-  public TableConfiguration getTableConfiguration(String tableId) {
-    return scf.getTableConfiguration(tableId);
-  }
-
-  public TableConfiguration getTableConfiguration(KeyExtent extent) {
-    return getTableConfiguration(extent.getTableId().toString());
-  }
+public abstract class ServerConfiguration {
+  
+  abstract public TableConfiguration getTableConfiguration(String tableId);
 
-  public NamespaceConfiguration getNamespaceConfiguration(String namespaceId) {
-    return scf.getNamespaceConfiguration(namespaceId);
-  }
+  abstract public TableConfiguration getTableConfiguration(KeyExtent extent);
 
-  public synchronized AccumuloConfiguration getConfiguration() {
-    return scf.getConfiguration();
-  }
+  abstract public NamespaceConfiguration getNamespaceConfiguration(String namespaceId);
 
-  public Instance getInstance() {
-    return scf.getInstance();
-  }
+  abstract public AccumuloConfiguration getConfiguration();
 
+  abstract public Instance getInstance();
+  
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 1559478..c81f045 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
@@ -32,7 +32,7 @@ import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
 /**
  * A factor for configurations used by a server process. Instance of this class are thread-safe.
  */
-public class ServerConfigurationFactory {
+public class ServerConfigurationFactory extends ServerConfiguration {
 
   private static final Map<String,Map<String,TableConfiguration>> tableConfigs;
   private static final Map<String,Map<String,NamespaceConfiguration>> namespaceConfigs;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
index 0cfb457..7995965 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
@@ -35,6 +35,7 @@ import java.util.Map.Entry;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.file.rfile.RFile;
@@ -42,7 +43,6 @@ import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.volume.NonConfiguredVolume;
 import org.apache.accumulo.core.volume.Volume;
 import org.apache.accumulo.core.volume.VolumeConfiguration;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.commons.lang.NotImplementedException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
@@ -394,7 +394,7 @@ public class VolumeManagerImpl implements VolumeManager {
   }
 
   public static VolumeManager get() throws IOException {
-    AccumuloConfiguration conf = ServerConfiguration.getSiteConfiguration();
+    AccumuloConfiguration conf = SiteConfiguration.getInstance();
     return get(conf);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 78fa4e7..0a681c4 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
@@ -61,7 +61,6 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.constraints.MetadataConstraints;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
@@ -152,7 +151,7 @@ public class Initialize {
     if (fsUri.equals(""))
       fsUri = FileSystem.getDefaultUri(conf).toString();
     log.info("Hadoop Filesystem is " + fsUri);
-    log.info("Accumulo data dirs are " + Arrays.asList(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration())));
+    log.info("Accumulo data dirs are " + Arrays.asList(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance())));
     log.info("Zookeeper server is " + sconf.get(Property.INSTANCE_ZK_HOST));
     log.info("Checking if Zookeeper is available. If this hangs, then you need to make sure zookeeper is running");
     if (!zookeeperAvailable()) {
@@ -186,7 +185,7 @@ public class Initialize {
   @SuppressWarnings("deprecation")
   static void printInitializeFailureMessages(SiteConfiguration sconf) {
     String instanceDfsDir = sconf.get(Property.INSTANCE_DFS_DIR);
-    log.fatal("It appears the directories " + Arrays.asList(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration()))
+    log.fatal("It appears the directories " + Arrays.asList(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()))
         + " were previously initialized.");
     String instanceVolumes = sconf.get(Property.INSTANCE_VOLUMES);
     String instanceDfsUri = sconf.get(Property.INSTANCE_DFS_URI);
@@ -205,7 +204,7 @@ public class Initialize {
   }
 
   public static boolean doInit(Opts opts, Configuration conf, VolumeManager fs) throws IOException {
-    if (!checkInit(conf, fs, ServerConfiguration.getSiteConfiguration())) {
+    if (!checkInit(conf, fs, SiteConfiguration.getInstance())) {
       return false;
     }
 
@@ -226,7 +225,7 @@ public class Initialize {
 
     UUID uuid = UUID.randomUUID();
     // the actual disk locations of the root table and tablets
-    String[] configuredTableDirs = VolumeConfiguration.prefix(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration()),
+    String[] configuredTableDirs = VolumeConfiguration.prefix(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()),
         ServerConstants.TABLE_DIR);
     final Path rootTablet = new Path(fs.choose(configuredTableDirs) + "/" + RootTable.ID + RootTable.ROOT_TABLET_LOCATION);
     try {
@@ -241,7 +240,7 @@ public class Initialize {
     } catch (Exception e) {
       log.fatal("Failed to initialize filesystem", e);
 
-      if (ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_VOLUMES).trim().equals("")) {
+      if (SiteConfiguration.getInstance().get(Property.INSTANCE_VOLUMES).trim().equals("")) {
         Configuration fsConf = CachedConfiguration.getInstance();
 
         final String defaultFsUri = "file:///";
@@ -302,7 +301,7 @@ public class Initialize {
   private static void initFileSystem(Opts opts, VolumeManager fs, UUID uuid, Path rootTablet) throws IOException {
     FileStatus fstat;
 
-    initDirs(fs, uuid, VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration()), false);
+    initDirs(fs, uuid, VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()), false);
 
     // the actual disk locations of the metadata table and tablets
     final Path[] metadataTableDirs = paths(ServerConstants.getMetadataTableDirs());
@@ -582,7 +581,7 @@ public class Initialize {
   }
 
   public static boolean isInitialized(VolumeManager fs) throws IOException {
-    for (String baseDir : VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration())) {
+    for (String baseDir : VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance())) {
       if (fs.exists(new Path(baseDir, ServerConstants.INSTANCE_ID_DIR)) || fs.exists(new Path(baseDir, ServerConstants.VERSION_DIR)))
         return true;
     }
@@ -593,17 +592,17 @@ public class Initialize {
   private static void addVolumes(VolumeManager fs) throws IOException {
     HashSet<String> initializedDirs = new HashSet<String>();
     initializedDirs
-        .addAll(Arrays.asList(ServerConstants.checkBaseUris(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration()), true)));
+        .addAll(Arrays.asList(ServerConstants.checkBaseUris(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance()), true)));
 
     HashSet<String> uinitializedDirs = new HashSet<String>();
-    uinitializedDirs.addAll(Arrays.asList(VolumeConfiguration.getVolumeUris(ServerConfiguration.getSiteConfiguration())));
+    uinitializedDirs.addAll(Arrays.asList(VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance())));
     uinitializedDirs.removeAll(initializedDirs);
 
     Path aBasePath = new Path(initializedDirs.iterator().next());
     Path iidPath = new Path(aBasePath, ServerConstants.INSTANCE_ID_DIR);
     Path versionPath = new Path(aBasePath, ServerConstants.VERSION_DIR);
 
-    UUID uuid = UUID.fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, ServerConfiguration.getSiteConfiguration()));
+    UUID uuid = UUID.fromString(ZooUtil.getInstanceIDFromHdfs(iidPath, SiteConfiguration.getInstance()));
 
     if (ServerConstants.DATA_VERSION != Accumulo.getAccumuloPersistentVersion(versionPath.getFileSystem(CachedConfiguration.getInstance()), versionPath)) {
       throw new IOException("Accumulo " + Constants.VERSION + " cannot initialize data version " + Accumulo.getAccumuloPersistentVersion(fs));
@@ -632,7 +631,7 @@ public class Initialize {
     opts.parseArgs(Initialize.class.getName(), args);
 
     try {
-      AccumuloConfiguration acuConf = ServerConfiguration.getSiteConfiguration();
+      AccumuloConfiguration acuConf = SiteConfiguration.getInstance();
       SecurityUtil.serverLogin(acuConf);
       Configuration conf = CachedConfiguration.getInstance();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 006fab7..3b07d4a 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
@@ -32,8 +32,10 @@ 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.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.NotImplementedException;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 
@@ -140,7 +142,11 @@ public class ChaoticLoadBalancer extends TabletBalancer {
   
   @Override
   public void init(ServerConfiguration conf) {
-    super.init(conf);
+    throw new NotImplementedException();
+  }
+
+  @Override
+  public void init(ServerConfigurationFactory conf) {
   }
   
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 5bd1632..b425e67 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
@@ -30,6 +30,7 @@ import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Client;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.core.util.ThriftUtil;
 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.accumulo.server.security.SystemCredentials;
@@ -42,15 +43,19 @@ public abstract class TabletBalancer {
   
   private static final Logger log = Logger.getLogger(TabletBalancer.class);
   
-  protected ServerConfiguration configuration;
+  protected ServerConfigurationFactory configuration;
   
   /**
    * Initialize the TabletBalancer. This gives the balancer the opportunity to read the configuration.
    */
-  public void init(ServerConfiguration conf) {
+  public void init(ServerConfigurationFactory conf) {
     configuration = conf;
   }
-  
+
+  public void init(ServerConfiguration conf) {
+    configuration = (ServerConfigurationFactory)conf;
+  }
+
   /**
    * Assign tablets to tablet servers. This method is called whenever the master finds tablets that are unassigned.
    * 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index 08f6d9e..5dc607f 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -26,12 +26,13 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.impl.SecurityOperationsImpl;
 import org.apache.accumulo.core.client.impl.Namespaces;
+import org.apache.accumulo.core.client.impl.SecurityOperationsImpl;
 import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.thrift.IterInfo;
 import org.apache.accumulo.core.data.thrift.TColumn;
 import org.apache.accumulo.core.data.thrift.TKeyExtent;
@@ -46,7 +47,6 @@ import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.security.handler.Authenticator;
 import org.apache.accumulo.server.security.handler.Authorizor;
 import org.apache.accumulo.server.security.handler.PermissionHandler;
@@ -86,21 +86,21 @@ public class SecurityOperation {
   }
 
   protected static Authorizor getAuthorizor(String instanceId, boolean initialize) {
-    Authorizor toRet = ServerConfiguration.getSiteConfiguration().instantiateClassProperty(Property.INSTANCE_SECURITY_AUTHORIZOR, Authorizor.class,
+    Authorizor toRet = SiteConfiguration.getInstance().instantiateClassProperty(Property.INSTANCE_SECURITY_AUTHORIZOR, Authorizor.class,
         ZKAuthorizor.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
 
   protected static Authenticator getAuthenticator(String instanceId, boolean initialize) {
-    Authenticator toRet = ServerConfiguration.getSiteConfiguration().instantiateClassProperty(Property.INSTANCE_SECURITY_AUTHENTICATOR, Authenticator.class,
+    Authenticator toRet = SiteConfiguration.getInstance().instantiateClassProperty(Property.INSTANCE_SECURITY_AUTHENTICATOR, Authenticator.class,
         ZKAuthenticator.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
 
   protected static PermissionHandler getPermHandler(String instanceId, boolean initialize) {
-    PermissionHandler toRet = ServerConfiguration.getSiteConfiguration().instantiateClassProperty(Property.INSTANCE_SECURITY_PERMISSION_HANDLER,
+    PermissionHandler toRet = SiteConfiguration.getInstance().instantiateClassProperty(Property.INSTANCE_SECURITY_PERMISSION_HANDLER,
         PermissionHandler.class, ZKPermHandler.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
index 68649bb..9506cb3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/security/SystemCredentials.java
@@ -30,12 +30,12 @@ import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.hadoop.io.Writable;
 
 /**
@@ -105,7 +105,7 @@ public final class SystemCredentials extends Credentials {
       md.update(ServerConstants.WIRE_VERSION.toString().getBytes(StandardCharsets.UTF_8));
       md.update(instanceIdBytes);
 
-      for (Entry<String,String> entry : ServerConfiguration.getSiteConfiguration()) {
+      for (Entry<String,String> entry : SiteConfiguration.getInstance()) {
         // only include instance properties
         if (entry.getKey().startsWith(Property.INSTANCE_PREFIX.toString())) {
           md.update(entry.getKey().getBytes(StandardCharsets.UTF_8));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 224f786..d85d61e 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
@@ -49,7 +49,7 @@ import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.security.SystemCredentials;
 import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.hadoop.conf.Configuration;
@@ -159,6 +159,7 @@ public class Admin {
       return;
     }
     Instance instance = opts.getInstance();
+    AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getConfiguration();
 
     try {
       String principal;
@@ -192,7 +193,7 @@ public class Admin {
         }
 
       } else if (cl.getParsedCommand().equals("stop")) {
-        stopTabletServer(instance, new Credentials(principal, token), stopOpts.args, opts.force);
+        stopTabletServer(conf, instance, new Credentials(principal, token), stopOpts.args, opts.force);
       } else if (cl.getParsedCommand().equals("dumpConfig")) {
         printConfig(instance, principal, token, dumpConfigCommand);
       } else if (cl.getParsedCommand().equals("volumes")) {
@@ -308,14 +309,14 @@ public class Admin {
     });
   }
 
-  private static void stopTabletServer(final Instance instance, final Credentials creds, List<String> servers, final boolean force) throws AccumuloException,
+  private static void stopTabletServer(final AccumuloConfiguration conf, final Instance instance, final Credentials creds, List<String> servers, final boolean force) throws AccumuloException,
       AccumuloSecurityException {
     if (instance.getMasterLocations().size() == 0) {
       log.info("No masters running. Not attempting safe unload of tserver.");
       return;
     }
     for (String server : servers) {
-      HostAndPort address = AddressUtil.parseAddress(server, ServerConfiguration.getDefaultConfiguration().getPort(Property.TSERV_CLIENTPORT));
+      HostAndPort address = AddressUtil.parseAddress(server, conf.getPort(Property.TSERV_CLIENTPORT));
       final String finalServer = address.toString();
       log.info("Stopping server " + finalServer);
       MasterClient.execute(instance, new ClientExec<MasterClientService.Client>() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java b/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
index b959159..f73747d 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ListInstances.java
@@ -28,9 +28,9 @@ import java.util.UUID;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooReader;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.log4j.Logger;
 
@@ -61,7 +61,7 @@ public class ListInstances {
     opts.parseArgs(ListInstances.class.getName(), args);
     
     if (opts.keepers == null) {
-      opts.keepers = ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST);
+      opts.keepers = SiteConfiguration.getInstance().get(Property.INSTANCE_ZK_HOST);
     }
     
     String keepers = opts.keepers;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java b/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
index e1cbd0e..241eef3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/LoginProperties.java
@@ -25,7 +25,7 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken.Token
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.security.handler.Authenticator;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 
@@ -35,7 +35,7 @@ import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 public class LoginProperties {
   
   public static void main(String[] args) throws Exception {
-    AccumuloConfiguration config = ServerConfiguration.getSystemConfiguration(HdfsZooInstance.getInstance());
+    AccumuloConfiguration config = new ServerConfigurationFactory(HdfsZooInstance.getInstance()).getConfiguration();
     Authenticator authenticator = AccumuloVFSClassLoader.getClassLoader().loadClass(config.get(Property.INSTANCE_SECURITY_AUTHENTICATOR))
         .asSubclass(Authenticator.class).newInstance();
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
index 3aa3b2c..0fbeb6b 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/VerifyTabletAssignments.java
@@ -50,15 +50,15 @@ import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.trace.thrift.TInfo;
 import org.apache.hadoop.io.Text;
+import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 import org.apache.thrift.TServiceClient;
 
 import com.beust.jcommander.Parameter;
-import org.apache.log4j.Logger;
 
 public class VerifyTabletAssignments {
   private static final Logger log = Logger.getLogger(VerifyTabletAssignments.class);
@@ -119,7 +119,7 @@ public class VerifyTabletAssignments {
     }
     
     ExecutorService tp = Executors.newFixedThreadPool(20);
-    final ServerConfiguration conf = new ServerConfiguration(inst);
+    final ServerConfigurationFactory conf = new ServerConfigurationFactory(inst);
     for (final Entry<String,List<KeyExtent>> entry : extentsPerServer.entrySet()) {
       Runnable r = new Runnable() {
         

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
index a98e1f0..20afc90 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
@@ -24,9 +24,9 @@ import java.nio.charset.StandardCharsets;
 
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.fate.util.UtilWaitThread;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
@@ -42,7 +42,7 @@ public class ZooReaderWriter extends org.apache.accumulo.fate.zookeeper.ZooReade
   
   public static synchronized ZooReaderWriter getInstance() {
     if (instance == null) {
-      AccumuloConfiguration conf = ServerConfiguration.getSiteConfiguration();
+      AccumuloConfiguration conf = SiteConfiguration.getInstance();
       instance = new ZooReaderWriter(conf.get(Property.INSTANCE_ZK_HOST), (int) conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT),
           conf.get(Property.INSTANCE_SECRET));
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
index 40a9d76..8494682 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
@@ -22,10 +22,10 @@ import java.nio.charset.StandardCharsets;
 
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.RetryingInvocationHandler;
 import org.apache.accumulo.fate.zookeeper.ZooReaderWriter;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 
 /**
  * A factory for {@link ZooReaderWriter} objects.
@@ -59,7 +59,7 @@ public class ZooReaderWriterFactory {
   public IZooReaderWriter getInstance() {
     synchronized (ZooReaderWriterFactory.class) {
       if (instance == null) {
-        AccumuloConfiguration conf = ServerConfiguration.getSiteConfiguration();
+        AccumuloConfiguration conf = SiteConfiguration.getInstance();
         instance = getZooReaderWriter(conf.get(Property.INSTANCE_ZK_HOST), (int) conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT),
             conf.get(Property.INSTANCE_SECRET));
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
index 03e0737..9646be9 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
@@ -56,7 +56,7 @@ import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.ServerConstants;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.replication.ReplicationTable;
 import org.apache.accumulo.server.security.SystemCredentials;
@@ -204,7 +204,7 @@ public class GarbageCollectWriteAheadLogs {
   }
 
   private int removeFiles(Map<String,Path> nameToFileMap, Map<String,ArrayList<Path>> serverToFileMap, Map<String,Path> sortedWALogs, final GCStatus status) {
-    AccumuloConfiguration conf = ServerConfiguration.getSystemConfiguration(instance);
+    AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getConfiguration();
     for (Entry<String,ArrayList<Path>> entry : serverToFileMap.entrySet()) {
       if (entry.getKey().isEmpty()) {
         // old-style log entry, just remove it

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 69cf080..ac79327 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
@@ -44,6 +44,7 @@ import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.PartialKey;
@@ -80,7 +81,7 @@ import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.ServerOpts;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
@@ -146,9 +147,9 @@ public class SimpleGarbageCollector implements Iface {
   private Instance instance;
 
   public static void main(String[] args) throws UnknownHostException, IOException {
-    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
+    SecurityUtil.serverLogin(SiteConfiguration.getInstance());
     Instance instance = HdfsZooInstance.getInstance();
-    ServerConfiguration serverConf = new ServerConfiguration(instance);
+    ServerConfigurationFactory serverConf = new ServerConfigurationFactory(instance);
     final VolumeManager fs = VolumeManagerImpl.get();
     Accumulo.init(fs, serverConf, "gc");
     Opts opts = new Opts();
@@ -234,7 +235,7 @@ public class SimpleGarbageCollector implements Iface {
    * @param noTrash true to not move files to trash instead of deleting
    */
   public void init(VolumeManager fs, Instance instance, Credentials credentials, boolean noTrash) {
-    init(fs, instance, credentials, noTrash, ServerConfiguration.getSystemConfiguration(instance));
+    init(fs, instance, credentials, noTrash, new ServerConfigurationFactory(instance).getConfiguration());
   }
 
   /**
@@ -630,7 +631,7 @@ public class SimpleGarbageCollector implements Iface {
 
       Trace.offNoFlush();
       try {
-        long gcDelay = ServerConfiguration.getSystemConfiguration(instance).getTimeInMillis(Property.GC_CYCLE_DELAY);
+        long gcDelay = new ServerConfigurationFactory(instance).getConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY);
         log.debug("Sleeping for " + gcDelay + " milliseconds");
         Thread.sleep(gcDelay);
       } catch (InterruptedException e) {
@@ -692,7 +693,7 @@ public class SimpleGarbageCollector implements Iface {
 
   private HostAndPort startStatsService() throws UnknownHostException {
     Processor<Iface> processor = new Processor<Iface>(RpcWrapper.service(this));
-    AccumuloConfiguration conf = ServerConfiguration.getSystemConfiguration(instance);
+    AccumuloConfiguration conf = new ServerConfigurationFactory(instance).getConfiguration();
     int port = conf.getPort(Property.GC_PORT);
     long maxMessageSize = conf.getMemoryInBytes(Property.GENERAL_MAX_MESSAGE_SIZE);
     HostAndPort result = HostAndPort.fromParts(opts.getAddress(), port);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 c599a3d..ae40cab 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
@@ -48,6 +48,7 @@ import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Value;
@@ -85,7 +86,7 @@ import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.ServerOpts;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
@@ -220,7 +221,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
     if (newState == MasterState.STOP) {
       // Give the server a little time before shutdown so the client
       // thread requesting the stop can return
-      SimpleTimer.getInstance(serverConfig.getConfiguration()).schedule(new Runnable() {
+      SimpleTimer.getInstance(getConfiguration()).schedule(new Runnable() {
         @Override
         public void run() {
           // This frees the main thread and will cause the master to exit
@@ -354,7 +355,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
   private final AtomicBoolean upgradeMetadataRunning = new AtomicBoolean(false);
   private final CountDownLatch waitForMetadataUpgrade = new CountDownLatch(1);
 
-  private final ServerConfiguration serverConfig;
+  private final ServerConfigurationFactory serverConfig;
 
   private void upgradeMetadata() {
     // we make sure we're only doing the rest of this method once so that we can signal to other threads that an upgrade wasn't needed.
@@ -474,7 +475,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
     return instance.getConnector(SystemCredentials.get().getPrincipal(), SystemCredentials.get().getToken());
   }
 
-  private Master(ServerConfiguration config, VolumeManager fs, String hostname) throws IOException {
+  private Master(ServerConfigurationFactory config, VolumeManager fs, String hostname) throws IOException {
     this.serverConfig = config;
     this.instance = config.getInstance();
     this.fs = fs;
@@ -494,7 +495,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
       AccumuloVFSClassLoader.getContextManager().setContextConfig(new ContextManager.DefaultContextsConfig(new Iterable<Entry<String,String>>() {
         @Override
         public Iterator<Entry<String,String>> iterator() {
-          return getSystemConfiguration().iterator();
+          return getConfiguration().iterator();
         }
       }));
     } catch (IOException e) {
@@ -829,7 +830,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
       TServerInstance instance = null;
       int crazyHoldTime = 0;
       int someHoldTime = 0;
-      final long maxWait = getSystemConfiguration().getTimeInMillis(Property.TSERV_HOLD_TIME_SUICIDE);
+      final long maxWait = getConfiguration().getTimeInMillis(Property.TSERV_HOLD_TIME_SUICIDE);
       for (Entry<TServerInstance,TabletServerStatus> entry : tserverStatus.entrySet()) {
         if (entry.getValue().getHoldTime() > 0) {
           someHoldTime++;
@@ -972,12 +973,12 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
       final AgeOffStore<Master> store = new AgeOffStore<Master>(new org.apache.accumulo.fate.ZooStore<Master>(ZooUtil.getRoot(instance) + Constants.ZFATE,
           ZooReaderWriter.getRetryingInstance()), 1000 * 60 * 60 * 8);
 
-      int threads = this.getConfiguration().getConfiguration().getCount(Property.MASTER_FATE_THREADPOOL_SIZE);
+      int threads = getConfiguration().getCount(Property.MASTER_FATE_THREADPOOL_SIZE);
 
       fate = new Fate<Master>(this, store);
       fate.startTransactionRunners(threads);
 
-      SimpleTimer.getInstance(serverConfig.getConfiguration()).schedule(new Runnable() {
+      SimpleTimer.getInstance(getConfiguration()).schedule(new Runnable() {
 
         @Override
         public void run() {
@@ -993,7 +994,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
     ZooKeeperInitialization.ensureZooKeeperInitialized(zReaderWriter, zroot);
 
     Processor<Iface> processor = new Processor<Iface>(RpcWrapper.service(new MasterClientServiceHandler(this)));
-    ServerAddress sa = TServerUtils.startServer(getSystemConfiguration(), hostname, Property.MASTER_CLIENTPORT, processor, "Master",
+    ServerAddress sa = TServerUtils.startServer(getConfiguration(), hostname, Property.MASTER_CLIENTPORT, processor, "Master",
         "Master Client Service Handler", null, Property.MASTER_MINTHREADS, Property.MASTER_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE);
     clientService = sa.server;
     String address = sa.address.toString();
@@ -1020,7 +1021,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
     // Start the replication coordinator which assigns tservers to service replication requests
     ReplicationCoordinator.Processor<ReplicationCoordinator.Iface> replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<ReplicationCoordinator.Iface>(
         RpcWrapper.service(new MasterReplicationCoordinator(this)));
-    ServerAddress replAddress = TServerUtils.startServer(getSystemConfiguration(), hostname, Property.MASTER_REPLICATION_COORDINATOR_PORT,
+    ServerAddress replAddress = TServerUtils.startServer(getConfiguration(), hostname, Property.MASTER_REPLICATION_COORDINATOR_PORT,
         replicationCoordinatorProcessor, "Master Replication Coordinator", "Replication Coordinator", null, Property.MASTER_REPLICATION_COORDINATOR_MINTHREADS,
         Property.MASTER_REPLICATION_COORDINATOR_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE);
 
@@ -1115,7 +1116,7 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
   private void getMasterLock(final String zMasterLoc) throws KeeperException, InterruptedException {
     log.info("trying to get master lock");
 
-    final String masterClientAddress = hostname + ":" + getSystemConfiguration().getPort(Property.MASTER_CLIENTPORT);
+    final String masterClientAddress = hostname + ":" + getConfiguration().getPort(Property.MASTER_CLIENTPORT);
 
     while (true) {
 
@@ -1143,14 +1144,14 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
 
   public static void main(String[] args) throws Exception {
     try {
-      SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
+      SecurityUtil.serverLogin(SiteConfiguration.getInstance());
 
       VolumeManager fs = VolumeManagerImpl.get();
       ServerOpts opts = new ServerOpts();
       opts.parseArgs("master", args);
       String hostname = opts.getAddress();
       Instance instance = HdfsZooInstance.getInstance();
-      ServerConfiguration conf = new ServerConfiguration(instance);
+      ServerConfigurationFactory conf = new ServerConfigurationFactory(instance);
       Accumulo.init(fs, conf, "master");
       Master master = new Master(conf, fs, hostname);
       Accumulo.enableTracing(hostname, "master");
@@ -1287,11 +1288,11 @@ public class Master implements LiveTServerSet.Listener, TableObserver, CurrentSt
     return this.instance;
   }
 
-  public AccumuloConfiguration getSystemConfiguration() {
+  public AccumuloConfiguration getConfiguration() {
     return serverConfig.getConfiguration();
   }
 
-  public ServerConfiguration getConfiguration() {
+  public ServerConfigurationFactory getConfigurationFactory() {
     return serverConfig;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/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 60884c2..a3eb70d 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
@@ -67,7 +67,7 @@ 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.client.ClientServiceHandler;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
 import org.apache.accumulo.server.master.balancer.TabletBalancer;
@@ -103,7 +103,7 @@ class MasterClientServiceHandler extends FateServiceHandler implements MasterCli
     String namespaceId = Tables.getNamespaceId(instance, tableId);
     master.security.canFlush(c, tableId, namespaceId);
 
-    String zTablePath = Constants.ZROOT + "/" + master.getConfiguration().getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId
+    String zTablePath = Constants.ZROOT + "/" + master.getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId
         + Constants.ZTABLE_FLUSH_ID;
 
     IZooReaderWriter zoo = ZooReaderWriter.getInstance();
@@ -458,9 +458,10 @@ class MasterClientServiceHandler extends FateServiceHandler implements MasterCli
 
   private void updatePlugins(String property) {
     if (property.equals(Property.MASTER_TABLET_BALANCER.getKey())) {
-      TabletBalancer balancer = ServerConfiguration.getSystemConfiguration(master.getInstance()).instantiateClassProperty(Property.MASTER_TABLET_BALANCER,
+      ServerConfigurationFactory factory = new ServerConfigurationFactory(master.getInstance());
+      TabletBalancer balancer = factory.getConfiguration().instantiateClassProperty(Property.MASTER_TABLET_BALANCER,
           TabletBalancer.class, new DefaultLoadBalancer());
-      balancer.init(master.getConfiguration());
+      balancer.init(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/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
index d4875e7..7df40a4 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/recovery/RecoveryManager.java
@@ -64,7 +64,7 @@ public class RecoveryManager {
     executor = Executors.newScheduledThreadPool(4, new NamingThreadFactory("Walog sort starter "));
     zooCache = new ZooCache();
     try {
-      AccumuloConfiguration aconf = master.getConfiguration().getConfiguration();
+      AccumuloConfiguration aconf = master.getConfiguration();
       List<String> workIDs = new DistributedWorkQueue(ZooUtil.getRoot(master.getInstance()) + Constants.ZRECOVERY, aconf).getWorkQueued();
       sortsQueued.addAll(workIDs);
     } catch (Exception e) {
@@ -89,7 +89,7 @@ public class RecoveryManager {
     public void run() {
       boolean rescheduled = false;
       try {
-        AccumuloConfiguration aconf = master.getConfiguration().getConfiguration();
+        AccumuloConfiguration aconf = master.getConfiguration();
         long time = closer.close(aconf, master.getFileSystem(), new Path(source));
 
         if (time > 0) {
@@ -169,11 +169,11 @@ public class RecoveryManager {
         recoveryNeeded = true;
         synchronized (this) {
           if (!closeTasksQueued.contains(sortId) && !sortsQueued.contains(sortId)) {
-            AccumuloConfiguration aconf = master.getConfiguration().getConfiguration();
+            AccumuloConfiguration aconf = master.getConfiguration();
             LogCloser closer = aconf.instantiateClassProperty(Property.MASTER_WALOG_CLOSER_IMPLEMETATION, LogCloser.class, new HadoopLogCloser());
             Long delay = recoveryDelay.get(sortId);
             if (delay == null) {
-              delay = master.getSystemConfiguration().getTimeInMillis(Property.MASTER_RECOVERY_DELAY);
+              delay = aconf.getTimeInMillis(Property.MASTER_RECOVERY_DELAY);
             } else {
               delay = Math.min(2 * delay, 1000 * 60 * 5l);
             }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/replication/ReplicationDriver.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/ReplicationDriver.java b/server/master/src/main/java/org/apache/accumulo/master/replication/ReplicationDriver.java
index ce6f6dc..a52f743 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/ReplicationDriver.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/ReplicationDriver.java
@@ -49,7 +49,7 @@ public class ReplicationDriver extends Daemon {
     super("Replication Driver");
 
     this.master = master;
-    this.conf = master.getConfiguration().getConfiguration();
+    this.conf = master.getConfiguration();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/replication/WorkDriver.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkDriver.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkDriver.java
index 43a74a8..975d06c 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkDriver.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkDriver.java
@@ -43,7 +43,7 @@ public class WorkDriver extends Daemon {
     super();
     this.master = master;
     this.conn = conn;
-    this.conf = master.getConfiguration().getConfiguration();
+    this.conf = master.getConfiguration();
     configureWorkAssigner();
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
index 76e7621..da17bba 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/WorkMaker.java
@@ -36,7 +36,7 @@ import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
 import org.apache.accumulo.core.replication.ReplicationTarget;
 import org.apache.accumulo.core.replication.StatusUtil;
 import org.apache.accumulo.core.replication.proto.Replication.Status;
-import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.conf.ServerConfigurationFactory;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.replication.ReplicationTable;
 import org.apache.accumulo.trace.instrument.Span;
@@ -63,6 +63,7 @@ public class WorkMaker {
   }
 
   public void run() {
+    ServerConfigurationFactory serverConf = new ServerConfigurationFactory(conn.getInstance());
     if (!conn.tableOperations().exists(ReplicationTable.NAME)) {
       log.info("Replication table does not yet exist");
       return;
@@ -109,7 +110,7 @@ public class WorkMaker {
         }
 
         // Get the table configuration for the table specified by the status record
-        tableConf = ServerConfiguration.getTableConfiguration(conn.getInstance(), tableId.toString());
+        tableConf = serverConf.getTableConfiguration(tableId.toString());
 
         // Pull the relevant replication targets
         // TODO Cache this instead of pulling it every time

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/state/SetGoalState.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/SetGoalState.java b/server/master/src/main/java/org/apache/accumulo/master/state/SetGoalState.java
index 56875c2..3da225d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/SetGoalState.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/SetGoalState.java
@@ -19,13 +19,13 @@ package org.apache.accumulo.master.state;
 import java.nio.charset.StandardCharsets;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.master.thrift.MasterGoalState;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
@@ -40,7 +40,7 @@ public class SetGoalState {
       System.err.println("Usage: accumulo " + SetGoalState.class.getName() + " [NORMAL|SAFE_MODE|CLEAN_STOP]");
       System.exit(-1);
     }
-    SecurityUtil.serverLogin(ServerConfiguration.getSiteConfiguration());
+    SecurityUtil.serverLogin(SiteConfiguration.getInstance());
 
     VolumeManager fs = VolumeManagerImpl.get();
     Accumulo.waitForZookeeperAndHdfs(fs);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c8b3e995/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
index 98f41cd..072fda1 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/BulkImport.java
@@ -48,8 +48,8 @@ import org.apache.accumulo.core.client.impl.thrift.ClientService.Client;
 import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Value;
@@ -65,7 +65,6 @@ import org.apache.accumulo.fate.Repo;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
@@ -436,7 +435,7 @@ class CopyFailed extends MasterRepo {
 
     if (loadedFailures.size() > 0) {
       DistributedWorkQueue bifCopyQueue = new DistributedWorkQueue(Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID()
-          + Constants.ZBULK_FAILED_COPYQ, master.getConfiguration().getConfiguration());
+          + Constants.ZBULK_FAILED_COPYQ, master.getConfiguration());
 
       HashSet<String> workIds = new HashSet<String>();
 
@@ -491,7 +490,7 @@ class LoadFiles extends MasterRepo {
 
   private static synchronized ExecutorService getThreadPool(Master master) {
     if (threadPool == null) {
-      int threadPoolSize = master.getSystemConfiguration().getCount(Property.MASTER_BULK_THREADPOOL_SIZE);
+      int threadPoolSize = master.getConfiguration().getCount(Property.MASTER_BULK_THREADPOOL_SIZE);
       ThreadPoolExecutor pool = new SimpleThreadPool(threadPoolSize, "bulk import");
       pool.allowCoreThreadTimeOut(true);
       threadPool = new TraceExecutorService(pool);
@@ -502,7 +501,7 @@ class LoadFiles extends MasterRepo {
   @Override
   public Repo<Master> call(final long tid, final Master master) throws Exception {
     ExecutorService executor = getThreadPool(master);
-    final SiteConfiguration conf = ServerConfiguration.getSiteConfiguration();
+    final AccumuloConfiguration conf = master.getConfiguration();
     VolumeManager fs = master.getFileSystem();
     List<FileStatus> files = new ArrayList<FileStatus>();
     for (FileStatus entry : fs.listStatus(new Path(bulk))) {
@@ -548,7 +547,7 @@ class LoadFiles extends MasterRepo {
               // get a connection to a random tablet server, do not prefer cached connections because
               // this is running on the master and there are lots of connections to tablet servers
               // serving the metadata tablets
-              long timeInMillis = master.getConfiguration().getConfiguration().getTimeInMillis(Property.MASTER_BULK_TIMEOUT);
+              long timeInMillis = master.getConfiguration().getTimeInMillis(Property.MASTER_BULK_TIMEOUT);
               Pair<String,Client> pair = ServerClient.getConnection(master.getInstance(), false, timeInMillis);
               client = pair.getSecond();
               server = pair.getFirst();


Mime
View raw message