accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [8/9] git commit: ACCUMULO-2615 and others - cleanup warnings
Date Sat, 23 Aug 2014 00:37:59 GMT
ACCUMULO-2615 and others - cleanup warnings

  Cleanup unused imports/fields, and deprecation warnings leftover from 2615, as
  well as ACCUMULO-2694, ACCUMULO-2988, ACCUMULO-3017, and ACCUMULO-3055


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

Branch: refs/heads/1.6.1-SNAPSHOT
Commit: 23c74cd4446e75db4367f6d0587fb84190d68d19
Parents: d61b694
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Aug 22 20:23:51 2014 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Aug 22 20:23:51 2014 -0400

----------------------------------------------------------------------
 .../core/conf/DefaultConfiguration.java         |  4 +-
 .../client/mapreduce/RangeInputSplitTest.java   | 30 ++++++-------
 .../minicluster/MiniAccumuloCluster.java        | 10 ++---
 .../minicluster/MiniAccumuloClusterTest.java    |  1 -
 .../server/conf/NamespaceConfiguration.java     |  6 +--
 .../server/conf/ServerConfigurationFactory.java | 14 ++++---
 .../accumulo/server/conf/TableConfWatcher.java  |  2 -
 .../server/conf/TableConfiguration.java         |  4 +-
 .../server/conf/ZooCachePropertyAccessor.java   | 44 ++++++++++++--------
 .../accumulo/server/conf/ZooConfiguration.java  | 25 ++++-------
 .../accumulo/server/util/MetadataTableUtil.java |  2 -
 .../server/conf/TableConfigurationTest.java     | 23 +++++-----
 .../conf/ZooCachePropertyAccessorTest.java      | 28 ++++++-------
 .../server/fs/VolumeManagerImplTest.java        |  7 ++--
 .../BalanceInPresenceOfOfflineTableIT.java      |  1 -
 15 files changed, 95 insertions(+), 106 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
index 6e1b779..d0b512b 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
@@ -21,12 +21,10 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.accumulo.core.Constants;
-
 public class DefaultConfiguration extends AccumuloConfiguration {
   private final static Map<String,String> resolvedProps;
   static {
-    Map<String, String> m = new HashMap<String,String>();
+    Map<String,String> m = new HashMap<String,String>();
     for (Property prop : Property.values()) {
       if (!prop.getType().equals(PropertyType.PREFIX)) {
         m.put(prop.getKey(), prop.getDefaultValue());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/core/src/test/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplitTest.java
b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplitTest.java
index 5115bf7..833e594 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplitTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplitTest.java
@@ -43,18 +43,18 @@ public class RangeInputSplitTest {
 
   @Test
   public void testSimpleWritable() throws IOException {
-    RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new
Key("b")), new String[]{"localhost"});
-    
+    RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new
Key("b")), new String[] {"localhost"});
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream dos = new DataOutputStream(baos);
     split.write(dos);
-    
+
     RangeInputSplit newSplit = new RangeInputSplit();
-    
+
     ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
     DataInputStream dis = new DataInputStream(bais);
     newSplit.readFields(dis);
-    
+
     Assert.assertEquals(split.getTableName(), newSplit.getTableName());
     Assert.assertEquals(split.getTableId(), newSplit.getTableId());
     Assert.assertEquals(split.getRange(), newSplit.getRange());
@@ -63,10 +63,10 @@ public class RangeInputSplitTest {
 
   @Test
   public void testAllFieldsWritable() throws IOException {
-    RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new
Key("b")), new String[]{"localhost"});
-    
+    RangeInputSplit split = new RangeInputSplit("table", "1", new Range(new Key("a"), new
Key("b")), new String[] {"localhost"});
+
     Set<Pair<Text,Text>> fetchedColumns = new HashSet<Pair<Text,Text>>();
-    
+
     fetchedColumns.add(new Pair<Text,Text>(new Text("colf1"), new Text("colq1")));
     fetchedColumns.add(new Pair<Text,Text>(new Text("colf2"), new Text("colq2")));
 
@@ -80,7 +80,7 @@ public class RangeInputSplitTest {
     setting.addOption("bar", "foo");
     iterators.add(setting);
 
-    split.setTable("table");
+    split.setTableName("table");
     split.setAuths(new Authorizations("foo"));
     split.setOffline(true);
     split.setIsolatedScan(true);
@@ -93,21 +93,21 @@ public class RangeInputSplitTest {
     split.setZooKeepers("localhost");
     split.setIterators(iterators);
     split.setLogLevel(Level.WARN);
-    
+
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     DataOutputStream dos = new DataOutputStream(baos);
     split.write(dos);
-    
+
     RangeInputSplit newSplit = new RangeInputSplit();
-    
+
     ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
     DataInputStream dis = new DataInputStream(bais);
     newSplit.readFields(dis);
-    
+
     Assert.assertEquals(split.getRange(), newSplit.getRange());
     Assert.assertArrayEquals(split.getLocations(), newSplit.getLocations());
 
-    Assert.assertEquals(split.getTable(), newSplit.getTable());
+    Assert.assertEquals(split.getTableName(), newSplit.getTableName());
     Assert.assertEquals(split.getAuths(), newSplit.getAuths());
     Assert.assertEquals(split.isOffline(), newSplit.isOffline());
     Assert.assertEquals(split.isIsolatedScan(), newSplit.isOffline());
@@ -121,5 +121,5 @@ public class RangeInputSplitTest {
     Assert.assertEquals(split.getIterators(), newSplit.getIterators());
     Assert.assertEquals(split.getLogLevel(), newSplit.getLogLevel());
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
index 4763eaa..3e8c5a0 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
@@ -28,12 +28,10 @@ import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 
-import com.google.common.base.Preconditions;
-
 /**
  * A utility class that will create Zookeeper and Accumulo processes that write all of their
data to a single local directory. This class makes it easy to test
  * code against a real Accumulo instance. Its much more accurate for testing than {@link
org.apache.accumulo.core.client.mock.MockAccumulo}, but much slower.
- * 
+ *
  * @since 1.5.0
  */
 public class MiniAccumuloCluster {
@@ -45,7 +43,7 @@ public class MiniAccumuloCluster {
   }
 
   /**
-   * 
+   *
    * @param dir
    *          An empty or nonexistant temp directoy that Accumulo and Zookeeper can store
data in. Creating the directory is left to the user. Java 7, Guava,
    *          and Junit provide methods for creating temporary directories.
@@ -66,7 +64,7 @@ public class MiniAccumuloCluster {
 
   /**
    * Starts Accumulo and Zookeeper processes. Can only be called once.
-   * 
+   *
    * @throws IllegalStateException
    *           if already started
    */
@@ -113,7 +111,7 @@ public class MiniAccumuloCluster {
 
   /**
    * Utility method to get a connector to the MAC.
-   * 
+   *
    * @since 1.6.0
    */
   public Connector getConnector(String user, String passwd) throws AccumuloException, AccumuloSecurityException
{

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
----------------------------------------------------------------------
diff --git a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
index 2cbb4b3..ec228af 100644
--- a/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
+++ b/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
@@ -43,7 +43,6 @@ import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
-import org.apache.log4j.Logger;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
b/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
index cadbd8e..30cffb7 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/NamespaceConfiguration.java
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.server.conf;
 
-import java.util.List;
 import java.util.Map;
 
 import org.apache.accumulo.core.Constants;
@@ -90,7 +89,7 @@ public class NamespaceConfiguration extends ObservableConfiguration {
   public String get(Property property) {
     String key = property.getKey();
     AccumuloConfiguration getParent;
-    if (!(namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) && isIteratorOrConstraint(property.getKey())))
{
+    if (!(namespaceId.equals(Namespaces.ACCUMULO_NAMESPACE_ID) && isIteratorOrConstraint(key)))
{
       getParent = parent;
     } else {
       // ignore iterators from parent if system namespace
@@ -157,8 +156,7 @@ public class NamespaceConfiguration extends ObservableConfiguration {
   }
 
   /**
-   * Invalidates the <code>ZooCache</code> used for storage and quick retrieval
-   * of properties for this namespace configuration.
+   * Invalidates the <code>ZooCache</code> used for storage and quick retrieval
of properties for this namespace configuration.
    */
   @Override
   public synchronized void invalidateCache() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/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 3bc349f..8e62a87 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
@@ -19,7 +19,6 @@ package org.apache.accumulo.server.conf;
 import java.security.SecurityPermission;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.Tables;
@@ -43,23 +42,25 @@ public class ServerConfigurationFactory {
     namespaceConfigs = new HashMap<String,Map<String,NamespaceConfiguration>>(1);
     tableParentConfigs = new HashMap<String,Map<String,NamespaceConfiguration>>(1);
   }
+
   private static void addInstanceToCaches(String iid) {
-    synchronized(tableConfigs) {
+    synchronized (tableConfigs) {
       if (!tableConfigs.containsKey(iid)) {
         tableConfigs.put(iid, new HashMap<String,TableConfiguration>());
       }
     }
-    synchronized(namespaceConfigs) {
+    synchronized (namespaceConfigs) {
       if (!namespaceConfigs.containsKey(iid)) {
         namespaceConfigs.put(iid, new HashMap<String,NamespaceConfiguration>());
       }
     }
-    synchronized(tableParentConfigs) {
+    synchronized (tableParentConfigs) {
       if (!tableParentConfigs.containsKey(iid)) {
         tableParentConfigs.put(iid, new HashMap<String,NamespaceConfiguration>());
       }
     }
   }
+
   private static final SecurityPermission CONFIGURATION_PERMISSION = new SecurityPermission("configurationPermission");
   private static final SecurityManager SM = System.getSecurityManager();
 
@@ -74,11 +75,13 @@ public class ServerConfigurationFactory {
       return tableConfigs.get(instanceId).remove(tableId) != null;
     }
   }
+
   static boolean removeCachedNamespaceConfiguration(String instanceId, String namespaceId)
{
     synchronized (namespaceConfigs) {
       return namespaceConfigs.get(instanceId).remove(namespaceId) != null;
     }
   }
+
   static void clearCachedConfigurations() {
     synchronized (tableConfigs) {
       tableConfigs.clear();
@@ -90,6 +93,7 @@ public class ServerConfigurationFactory {
       tableParentConfigs.clear();
     }
   }
+
   static void expireAllTableObservers() {
     synchronized (tableConfigs) {
       for (Map<String,TableConfiguration> instanceMap : tableConfigs.values()) {
@@ -109,6 +113,7 @@ public class ServerConfigurationFactory {
     instanceID = instance.getInstanceID();
     addInstanceToCaches(instanceID);
   }
+
   void setZooCacheFactory(ZooCacheFactory zcf) {
     this.zcf = zcf;
   }
@@ -141,7 +146,6 @@ public class ServerConfigurationFactory {
     return systemConfig;
   }
 
-
   public TableConfiguration getTableConfiguration(String tableId) {
     checkPermissions();
     synchronized (tableConfigs) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfWatcher.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfWatcher.java
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfWatcher.java
index 4709b85..b657056 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfWatcher.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/TableConfWatcher.java
@@ -33,13 +33,11 @@ class TableConfWatcher implements Watcher {
   private static final Logger log = Logger.getLogger(TableConfWatcher.class);
   private final Instance instance;
   private final String tablesPrefix;
-  private final int tablesPrefixLength;
   private ServerConfigurationFactory scf;
 
   TableConfWatcher(Instance instance) {
     this.instance = instance;
     tablesPrefix = ZooUtil.getRoot(instance) + Constants.ZTABLES + "/";
-    tablesPrefixLength = tablesPrefix.length();
     scf = new ServerConfigurationFactory(instance);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/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 1936484..8cf46c7 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,7 +16,6 @@
  */
 package org.apache.accumulo.server.conf;
 
-import java.util.List;
 import java.util.Map;
 
 import org.apache.accumulo.core.Constants;
@@ -131,8 +130,7 @@ public class TableConfiguration extends ObservableConfiguration {
   }
 
   /**
-   * Invalidates the <code>ZooCache</code> used for storage and quick retrieval
-   * of properties for this table configuration.
+   * Invalidates the <code>ZooCache</code> used for storage and quick retrieval
of properties for this table configuration.
    */
   @Override
   public synchronized void invalidateCache() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/main/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessor.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessor.java
b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessor.java
index ac30008..df1be50 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessor.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessor.java
@@ -18,11 +18,11 @@ package org.apache.accumulo.server.conf;
 
 import java.util.List;
 import java.util.Map;
+
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.log4j.Logger;
 
@@ -35,10 +35,12 @@ public class ZooCachePropertyAccessor {
   static class PropCacheKey {
     final String instanceId;
     final String scope;
+
     PropCacheKey(String iid, String s) {
       instanceId = iid;
       scope = s;
     }
+
     @Override
     public boolean equals(Object other) {
       if (this == other) {
@@ -50,6 +52,7 @@ public class ZooCachePropertyAccessor {
       PropCacheKey o = (PropCacheKey) other;
       return (instanceId.equals(o.instanceId) && scope.equals(o.scope));
     }
+
     @Override
     public int hashCode() {
       int c = 17;
@@ -64,11 +67,13 @@ public class ZooCachePropertyAccessor {
   /**
    * Creates a new accessor.
    *
-   * @param propCache property cache
+   * @param propCache
+   *          property cache
    */
   ZooCachePropertyAccessor(ZooCache propCache) {
     this.propCache = propCache;
   }
+
   /**
    * Gets the property cache accessed by this object.
    *
@@ -79,13 +84,15 @@ public class ZooCachePropertyAccessor {
   }
 
   /**
-   * Gets a property. If the property is not in ZooKeeper or is present but an
-   * invalid format for the property type, the parent configuration is consulted
-   * (if provided).
+   * Gets a property. If the property is not in ZooKeeper or is present but an invalid format
for the property type, the parent configuration is consulted (if
+   * provided).
    *
-   * @param property property to get
-   * @param path ZooKeeper path where properties lie
-   * @param parent parent configuration (optional)
+   * @param property
+   *          property to get
+   * @param path
+   *          ZooKeeper path where properties lie
+   * @param parent
+   *          parent configuration (optional)
    * @return property value, or null if not found
    */
   String get(Property property, String path, AccumuloConfiguration parent) {
@@ -113,16 +120,19 @@ public class ZooCachePropertyAccessor {
   }
 
   /**
-   * Gets all properties into the given map. Properties are filtered using the
-   * given filter. Properties from a parent configuration are also added to the
-   * map and filtered, either using a separate filter or, if not specified, the
-   * other filter.
+   * Gets all properties into the given map. Properties are filtered using the given filter.
Properties from a parent configuration are also added to the map
+   * and filtered, either using a separate filter or, if not specified, the other filter.
    *
-   * @param props map to populate with properties
-   * @param path ZooKeeper path where properties lie
-   * @param filter property filter (required)
-   * @param parent parent configuration (required)
-   * @param parentFilter separate filter for parent properties (optional)
+   * @param props
+   *          map to populate with properties
+   * @param path
+   *          ZooKeeper path where properties lie
+   * @param filter
+   *          property filter (required)
+   * @param parent
+   *          parent configuration (required)
+   * @param parentFilter
+   *          separate filter for parent properties (optional)
    */
   void getProperties(Map<String,String> props, String path, PropertyFilter filter,
AccumuloConfiguration parent, PropertyFilter parentFilter) {
     parent.getProperties(props, parentFilter != null ? parentFilter : filter);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
index e2bf5f5..a49ec43 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/conf/ZooConfiguration.java
@@ -16,39 +16,32 @@
  */
 package org.apache.accumulo.server.conf;
 
-import java.io.IOException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import org.apache.accumulo.core.Constants;
-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.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.fs.VolumeManager;
-import org.apache.accumulo.server.fs.VolumeManagerImpl;
-import org.apache.hadoop.fs.Path;
 import org.apache.log4j.Logger;
 
 public class ZooConfiguration extends AccumuloConfiguration {
   private static final Logger log = Logger.getLogger(ZooConfiguration.class);
-  
+
   private final String instanceId;
   private final ZooCache propCache;
   private final AccumuloConfiguration parent;
   private final Map<String,String> fixedProps = Collections.synchronizedMap(new HashMap<String,String>());
-  
+
   protected ZooConfiguration(String instanceId, ZooCache propCache, AccumuloConfiguration
parent) {
     this.instanceId = instanceId;
     this.propCache = propCache;
     this.parent = parent;
   }
-  
+
   @Override
   public void invalidateCache() {
     if (propCache != null)
@@ -67,11 +60,11 @@ public class ZooConfiguration extends AccumuloConfiguration {
   private String _get(Property property) {
     String key = property.getKey();
     String value = null;
-    
+
     if (Property.isValidZooPropertyKey(key)) {
       value = get(key);
     }
-    
+
     if (value == null || !property.getType().isValidFormat(value)) {
       if (value != null)
         log.error("Using parent value for " + key + " due to improperly formatted " + property.getType()
+ ": " + value);
@@ -79,7 +72,7 @@ public class ZooConfiguration extends AccumuloConfiguration {
     }
     return value;
   }
-  
+
   @Override
   public String get(Property property) {
     if (Property.isFixedZooPropertyKey(property)) {
@@ -91,13 +84,13 @@ public class ZooConfiguration extends AccumuloConfiguration {
           fixedProps.put(property.getKey(), val);
           return val;
         }
-        
+
       }
     } else {
       return _get(property);
     }
   }
-  
+
   private String get(String key) {
     String zPath = ZooUtil.getRoot(instanceId) + Constants.ZCONFIG + "/" + key;
     byte[] v = propCache.get(zPath);
@@ -106,7 +99,7 @@ public class ZooConfiguration extends AccumuloConfiguration {
       value = new String(v, Constants.UTF8);
     return value;
   }
-  
+
   @Override
   public void getProperties(Map<String,String> props, PropertyFilter filter) {
     parent.getProperties(props, filter);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
index e702af4..463ca57 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java
@@ -18,7 +18,6 @@ package org.apache.accumulo.server.util;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -984,7 +983,6 @@ public class MetadataTableUtil {
 
   }
 
-
   public static void moveMetaDeleteMarkersFrom14(Instance instance, Credentials creds) {
     // new KeyExtent is only added to force update to write to the metadata table, not the
root table
     KeyExtent notMetadata = new KeyExtent(new Text("anythingNotMetadata"), null, null);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
b/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
index b7f27cc..92580f3 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/conf/TableConfigurationTest.java
@@ -16,14 +16,23 @@
  */
 package org.apache.accumulo.server.conf;
 
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.client.impl.Namespaces;
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.AccumuloConfiguration.AllFilter;
 import org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter;
 import org.apache.accumulo.core.conf.ConfigurationObserver;
@@ -33,16 +42,6 @@ import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
 
 public class TableConfigurationTest {
   private static final String TID = "table";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/test/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessorTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessorTest.java
b/server/base/src/test/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessorTest.java
index 77e88b1..1b9d8f7 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessorTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/conf/ZooCachePropertyAccessorTest.java
@@ -16,26 +16,24 @@
  */
 package org.apache.accumulo.server.conf;
 
-import java.nio.charset.Charset;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+
 import java.util.List;
 import java.util.Map;
+
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.AccumuloConfiguration.PropertyFilter;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.conf.PropertyType;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
-
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import org.easymock.Capture;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
 
 public class ZooCachePropertyAccessorTest {
   private static final String PATH = "/root/path/to/props";
@@ -61,7 +59,7 @@ public class ZooCachePropertyAccessorTest {
 
   @Test
   public void testGet_Valid() {
-    expect(zc.get(PATH + "/" + KEY)).andReturn(VALUE_BYTES);
+    expect(zc.get(FULL_PATH)).andReturn(VALUE_BYTES);
     replay(zc);
     assertEquals(VALUE, a.get(PROP, PATH, null));
   }
@@ -71,7 +69,7 @@ public class ZooCachePropertyAccessorTest {
     AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
     expect(parent.get(PROP)).andReturn(VALUE);
     replay(parent);
-    expect(zc.get(PATH + "/" + KEY)).andReturn(null);
+    expect(zc.get(FULL_PATH)).andReturn(null);
     replay(zc);
     assertEquals(VALUE, a.get(PROP, PATH, parent));
   }
@@ -81,14 +79,14 @@ public class ZooCachePropertyAccessorTest {
     AccumuloConfiguration parent = createMock(AccumuloConfiguration.class);
     expect(parent.get(PROP)).andReturn(null);
     replay(parent);
-    expect(zc.get(PATH + "/" + KEY)).andReturn(null);
+    expect(zc.get(FULL_PATH)).andReturn(null);
     replay(zc);
     assertNull(a.get(PROP, PATH, parent));
   }
 
   @Test
   public void testGet_Null_NoParent() {
-    expect(zc.get(PATH + "/" + KEY)).andReturn(null);
+    expect(zc.get(FULL_PATH)).andReturn(null);
     replay(zc);
     assertNull(a.get(PROP, PATH, null));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
index 5f97bf6..582822a 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/fs/VolumeManagerImplTest.java
@@ -19,7 +19,6 @@ package org.apache.accumulo.server.fs;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
@@ -29,7 +28,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 /**
- * 
+ *
  */
 public class VolumeManagerImplTest {
 
@@ -65,7 +64,7 @@ public class VolumeManagerImplTest {
     String basePath = fs.getDefaultVolume().getBasePath();
     String scheme = fs.getDefaultVolume().getFileSystem().getUri().toURL().getProtocol();
     System.out.println(basePath);
-    Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());

+    Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());
     List<String> pathsToTest = Arrays.asList("1/default_tablet", "1/default_tablet/",
"1/t-0000001");
     for (String pathToTest : pathsToTest) {
       Path fullPath = fs.getFullPath(FileType.TABLE, pathToTest);
@@ -78,7 +77,7 @@ public class VolumeManagerImplTest {
     String basePath = fs.getDefaultVolume().getBasePath();
     String scheme = fs.getDefaultVolume().getFileSystem().getUri().toURL().getProtocol();
     System.out.println(basePath);
-    Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());

+    Path expectedBase = new Path(scheme + ":" + basePath, FileType.TABLE.getDirectory());
     List<String> pathsToTest = Arrays.asList("1/default_tablet/C0000001.rf", "1/t-0000001/C0000001.rf");
     for (String pathToTest : pathsToTest) {
       Path fullPath = fs.getFullPath(FileType.TABLE, pathToTest);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/23c74cd4/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
index 37aa8a1..887aee4 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java
@@ -126,7 +126,6 @@ public class BalanceInPresenceOfOfflineTableIT extends ConfigurableMacIT
{
         continue;
       }
 
-      int numTablets = 0;
       long[] tabletsPerServer = new long[stats.getTServerInfoSize()];
       Arrays.fill(tabletsPerServer, 0l);
       for (int i = 0; i < stats.getTServerInfoSize(); i++) {


Mime
View raw message