accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3643 Catch findbugs up through rank 16
Date Wed, 11 Mar 2015 21:40:52 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
----------------------------------------------------------------------
diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
index 5b6a9da..7abf178 100644
--- a/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
+++ b/proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java
@@ -135,16 +135,16 @@ public class ProxyServer implements AccumuloProxy.Iface {
     public Iterator<Map.Entry<Key,Value>> iterator;
   }
 
-  static protected class BatchWriterPlusException {
+  static protected class BatchWriterPlusProblem {
     public BatchWriter writer;
     public MutationsRejectedException exception = null;
   }
 
-  static class CloseWriter implements RemovalListener<UUID,BatchWriterPlusException> {
+  static class CloseWriter implements RemovalListener<UUID,BatchWriterPlusProblem> {
     @Override
-    public void onRemoval(RemovalNotification<UUID,BatchWriterPlusException> notification) {
+    public void onRemoval(RemovalNotification<UUID,BatchWriterPlusProblem> notification) {
       try {
-        BatchWriterPlusException value = notification.getValue();
+        BatchWriterPlusProblem value = notification.getValue();
         if (value.exception != null)
           throw value.exception;
         notification.getValue().writer.close();
@@ -177,7 +177,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
   }
 
   protected Cache<UUID,ScannerPlusIterator> scannerCache;
-  protected Cache<UUID,BatchWriterPlusException> writerCache;
+  protected Cache<UUID,BatchWriterPlusProblem> writerCache;
   protected Cache<UUID,ConditionalWriter> conditionalWriterCache;
 
   private final ThriftServerType serverType;
@@ -1184,7 +1184,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
       throws org.apache.accumulo.proxy.thrift.AccumuloException, org.apache.accumulo.proxy.thrift.AccumuloSecurityException,
       org.apache.accumulo.proxy.thrift.TableNotFoundException, org.apache.accumulo.proxy.thrift.MutationsRejectedException, TException {
     try {
-      BatchWriterPlusException bwpe = getWriter(login, tableName, null);
+      BatchWriterPlusProblem bwpe = getWriter(login, tableName, null);
       addCellsToWriter(cells, bwpe);
       if (bwpe.exception != null)
         throw bwpe.exception;
@@ -1197,7 +1197,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
 
   private static final ColumnVisibility EMPTY_VIS = new ColumnVisibility();
 
-  private void addCellsToWriter(Map<ByteBuffer,List<ColumnUpdate>> cells, BatchWriterPlusException bwpe) {
+  private void addCellsToWriter(Map<ByteBuffer,List<ColumnUpdate>> cells, BatchWriterPlusProblem bwpe) {
     if (bwpe.exception != null)
       return;
 
@@ -1253,7 +1253,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
   public String createWriter(ByteBuffer login, String tableName, WriterOptions opts) throws org.apache.accumulo.proxy.thrift.AccumuloException,
       org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
     try {
-      BatchWriterPlusException writer = getWriter(login, tableName, opts);
+      BatchWriterPlusProblem writer = getWriter(login, tableName, opts);
       UUID uuid = UUID.randomUUID();
       writerCache.put(uuid, writer);
       return uuid.toString();
@@ -1266,7 +1266,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
   @Override
   public void update(String writer, Map<ByteBuffer,List<ColumnUpdate>> cells) throws TException {
     try {
-      BatchWriterPlusException bwpe = getWriter(writer);
+      BatchWriterPlusProblem bwpe = getWriter(writer);
       addCellsToWriter(cells, bwpe);
     } catch (UnknownWriter e) {
       // just drop it, this is a oneway thrift call and throwing a TException seems to make all subsequent thrift calls fail
@@ -1276,7 +1276,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
   @Override
   public void flush(String writer) throws UnknownWriter, org.apache.accumulo.proxy.thrift.MutationsRejectedException, TException {
     try {
-      BatchWriterPlusException bwpe = getWriter(writer);
+      BatchWriterPlusProblem bwpe = getWriter(writer);
       if (bwpe.exception != null)
         throw bwpe.exception;
       bwpe.writer.flush();
@@ -1292,7 +1292,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
   @Override
   public void closeWriter(String writer) throws UnknownWriter, org.apache.accumulo.proxy.thrift.MutationsRejectedException, TException {
     try {
-      BatchWriterPlusException bwpe = getWriter(writer);
+      BatchWriterPlusProblem bwpe = getWriter(writer);
       if (bwpe.exception != null)
         throw bwpe.exception;
       bwpe.writer.close();
@@ -1306,7 +1306,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
     }
   }
 
-  private BatchWriterPlusException getWriter(String writer) throws UnknownWriter {
+  private BatchWriterPlusProblem getWriter(String writer) throws UnknownWriter {
     UUID uuid = null;
     try {
       uuid = UUID.fromString(writer);
@@ -1314,14 +1314,14 @@ public class ProxyServer implements AccumuloProxy.Iface {
       throw new UnknownWriter(iae.getMessage());
     }
 
-    BatchWriterPlusException bwpe = writerCache.getIfPresent(uuid);
+    BatchWriterPlusProblem bwpe = writerCache.getIfPresent(uuid);
     if (bwpe == null) {
       throw new UnknownWriter("Writer never existed or no longer exists");
     }
     return bwpe;
   }
 
-  private BatchWriterPlusException getWriter(ByteBuffer login, String tableName, WriterOptions opts) throws Exception {
+  private BatchWriterPlusProblem getWriter(ByteBuffer login, String tableName, WriterOptions opts) throws Exception {
     BatchWriterConfig cfg = new BatchWriterConfig();
     if (opts != null) {
       if (opts.maxMemory != 0)
@@ -1336,7 +1336,7 @@ public class ProxyServer implements AccumuloProxy.Iface {
         cfg.setDurability(getDurability(opts.getDurability()));
       }
     }
-    BatchWriterPlusException result = new BatchWriterPlusException();
+    BatchWriterPlusProblem result = new BatchWriterPlusProblem();
     result.writer = getConnector(login).createBatchWriter(tableName, cfg);
     return result;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/server/base/src/main/findbugs/exclude-filter.xml b/server/base/src/main/findbugs/exclude-filter.xml
index 6d1ea2a..b018f08 100644
--- a/server/base/src/main/findbugs/exclude-filter.xml
+++ b/server/base/src/main/findbugs/exclude-filter.xml
@@ -23,4 +23,12 @@
     </Or>
     <Bug code="NM" pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS" />
   </Match>
+  <Match>
+    <!-- admin classes can call System.exit -->
+    <Or>
+      <Class name="org.apache.accumulo.server.util.Admin" />
+      <Class name="org.apache.accumulo.server.init.Initialize" />
+    </Or>
+    <Bug code="DM" pattern="DM_EXIT" />
+  </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
index 487829e..153dc79 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java
@@ -92,7 +92,7 @@ public class MetadataConstraints implements Constraint {
 
   static private ArrayList<Short> addIfNotPresent(ArrayList<Short> lst, int intViolation) {
     if (lst == null)
-      return addViolation(lst, intViolation);
+      return addViolation(null, intViolation);
     short violation = (short) intViolation;
     if (!lst.contains(violation))
       return addViolation(lst, intViolation);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/data/ServerMutation.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/data/ServerMutation.java b/server/base/src/main/java/org/apache/accumulo/server/data/ServerMutation.java
index cb4fa97..54629e3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/data/ServerMutation.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/data/ServerMutation.java
@@ -42,6 +42,7 @@ public class ServerMutation extends Mutation {
 
   public ServerMutation() {}
 
+  @Override
   protected void droppingOldTimestamp(long ts) {
     this.systemTime = ts;
   }
@@ -80,17 +81,7 @@ public class ServerMutation extends Mutation {
 
   @Override
   public boolean equals(Object o) {
-    if (o == this) {
-      return true;
-    }
-    if (o == null || o.getClass() != ServerMutation.class) {
-      return false;
-    }
-    ServerMutation sm = (ServerMutation) o;
-    if (sm.systemTime != systemTime) {
-      return false;
-    }
-    return super.equals(o);
+    return o == this || (o != null && o instanceof ServerMutation && systemTime == ((ServerMutation) o).systemTime && super.equals(o));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilter.java b/server/base/src/main/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilter.java
index c689fd3..eb9716c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilter.java
@@ -49,7 +49,7 @@ public class MetadataBulkLoadFilter extends Filter {
   @Override
   public boolean accept(Key k, Value v) {
     if (!k.isDeleted() && k.compareColumnFamily(TabletsSection.BulkFileColumnFamily.NAME) == 0) {
-      long txid = Long.valueOf(v.toString());
+      long txid = Long.parseLong(v.toString());
 
       Status status = bulkTxStatusCache.get(txid);
       if (status == null) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
index cec21e1..1955dce 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancer.java
@@ -23,6 +23,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Set;
 import java.util.SortedMap;
 
@@ -96,6 +97,16 @@ public class DefaultLoadBalancer extends TabletBalancer {
     }
 
     @Override
+    public int hashCode() {
+      return Objects.hashCode(server) + count;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+      return obj == this || (obj != null && obj instanceof ServerCounts && 0 == compareTo((ServerCounts) obj));
+    }
+
+    @Override
     public int compareTo(ServerCounts obj) {
       int result = count - obj.count;
       if (result == 0)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
index 93db9c8..6d772e3 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/AbstractMetricsImpl.java
@@ -38,7 +38,7 @@ import org.apache.commons.lang.time.DateUtils;
 
 public abstract class AbstractMetricsImpl implements Metrics {
 
-  public class Metric {
+  public static class Metric {
 
     private long count = 0;
     private long avg = 0;
@@ -268,11 +268,8 @@ public abstract class AbstractMetricsImpl implements Metrics {
         logWriter.close();
       } catch (Exception e) {
         // do nothing
-      } finally {
-        logWriter = null;
       }
     }
-    logFile = null;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
index 71c82b9..cee30bc 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/replication/StatusFormatter.java
@@ -17,8 +17,6 @@
 package org.apache.accumulo.server.replication;
 
 import java.text.DateFormat;
-import java.text.FieldPosition;
-import java.text.ParsePosition;
 import java.util.Collections;
 import java.util.Date;
 import java.util.Iterator;
@@ -34,6 +32,7 @@ import org.apache.accumulo.core.replication.ReplicationSchema.StatusSection;
 import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.util.format.DefaultFormatter;
+import org.apache.accumulo.core.util.format.DefaultFormatter.DefaultDateFormat;
 import org.apache.accumulo.core.util.format.Formatter;
 import org.apache.accumulo.server.replication.proto.Replication.Status;
 import org.apache.hadoop.io.Text;
@@ -68,22 +67,6 @@ public class StatusFormatter implements Formatter {
     protected DateFormat initialValue() {
       return new DefaultDateFormat();
     }
-
-    class DefaultDateFormat extends DateFormat {
-      private static final long serialVersionUID = 1L;
-
-      @Override
-      public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
-        toAppendTo.append(Long.toString(date.getTime()));
-        return toAppendTo;
-      }
-
-      @Override
-      public Date parse(String source, ParsePosition pos) {
-        return new Date(Long.parseLong(source));
-      }
-
-    }
   };
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/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 adf3364..932de0d 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
@@ -310,7 +310,9 @@ public class Admin implements KeywordExecutable {
             try {
               conn.tableOperations().flush(table, null, null, false);
               flushesStarted.incrementAndGet();
-            } catch (TableNotFoundException e) {}
+            } catch (TableNotFoundException e) {
+              // ignore
+            }
           }
         } catch (Exception e) {
           log.warn("Failed to intiate flush " + e.getMessage());
@@ -325,13 +327,17 @@ public class Admin implements KeywordExecutable {
     long start = System.currentTimeMillis();
     try {
       flusher.join(3000);
-    } catch (InterruptedException e) {}
+    } catch (InterruptedException e) {
+      // ignore
+    }
 
     while (flusher.isAlive() && System.currentTimeMillis() - start < 15000) {
       int flushCount = flushesStarted.get();
       try {
         flusher.join(1000);
-      } catch (InterruptedException e) {}
+      } catch (InterruptedException e) {
+        // ignore
+      }
 
       if (flushCount == flushesStarted.get()) {
         // no progress was made while waiting for join... maybe its stuck, stop waiting on it
@@ -454,7 +460,9 @@ public class Admin implements KeywordExecutable {
       if (null == p)
         return defaultValue;
       defaultValue = defaultConfig.get(p);
-    } catch (IllegalArgumentException e) {}
+    } catch (IllegalArgumentException e) {
+      // ignore
+    }
     return defaultValue;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
index 39e454d..3ceb07e 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/GroupBalancerTest.java
@@ -47,7 +47,7 @@ public class GroupBalancerTest {
 
     @Override
     public String apply(KeyExtent input) {
-      return input.getEndRow().toString().substring(0, 2);
+      return (input == null || input.getEndRow() == null) ? null : input.getEndRow().toString().substring(0, 2);
     }
   };
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
index 8e68d84..4d36f47 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/master/balancer/TableLoadBalancerTest.java
@@ -101,7 +101,7 @@ public class TableLoadBalancerTest {
   }
 
   // ugh... so wish I had provided mock objects to the LoadBalancer in the master
-  static class TableLoadBalancer extends org.apache.accumulo.server.master.balancer.TableLoadBalancer {
+  class TableLoadBalancer extends org.apache.accumulo.server.master.balancer.TableLoadBalancer {
 
     TableLoadBalancer() {
       super();
@@ -157,9 +157,9 @@ public class TableLoadBalancerTest {
     tls.balance(state, migrations, migrationsOut);
     int count = 0;
     Map<String,Integer> movedByTable = new HashMap<String,Integer>();
-    movedByTable.put(t1Id, new Integer(0));
-    movedByTable.put(t2Id, new Integer(0));
-    movedByTable.put(t3Id, new Integer(0));
+    movedByTable.put(t1Id, Integer.valueOf(0));
+    movedByTable.put(t2Id, Integer.valueOf(0));
+    movedByTable.put(t3Id, Integer.valueOf(0));
     for (TabletMigration migration : migrationsOut) {
       if (migration.oldServer.equals(svr))
         count++;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/test/java/org/apache/accumulo/server/security/SystemCredentialsTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/security/SystemCredentialsTest.java b/server/base/src/test/java/org/apache/accumulo/server/security/SystemCredentialsTest.java
index 01ff9ac..9d5dd68 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/security/SystemCredentialsTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/security/SystemCredentialsTest.java
@@ -44,14 +44,14 @@ public class SystemCredentialsTest {
     File testInstanceId = new File(new File(new File(new File("target"), "instanceTest"), ServerConstants.INSTANCE_ID_DIR), UUID.fromString(
         "00000000-0000-0000-0000-000000000000").toString());
     if (!testInstanceId.exists()) {
-      testInstanceId.getParentFile().mkdirs();
-      testInstanceId.createNewFile();
+      assertTrue(testInstanceId.getParentFile().mkdirs() || testInstanceId.getParentFile().isDirectory());
+      assertTrue(testInstanceId.createNewFile());
     }
 
     File testInstanceVersion = new File(new File(new File(new File("target"), "instanceTest"), ServerConstants.VERSION_DIR), ServerConstants.DATA_VERSION + "");
     if (!testInstanceVersion.exists()) {
-      testInstanceVersion.getParentFile().mkdirs();
-      testInstanceVersion.createNewFile();
+      assertTrue(testInstanceVersion.getParentFile().mkdirs() || testInstanceVersion.getParentFile().isDirectory());
+      assertTrue(testInstanceVersion.createNewFile());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/base/src/test/java/org/apache/accumulo/server/util/FileUtilTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/FileUtilTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/FileUtilTest.java
index 65db4b8..5fe35f9 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/util/FileUtilTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/util/FileUtilTest.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.server.util;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.expect;
 import static org.easymock.EasyMock.replay;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
@@ -85,7 +86,7 @@ public class FileUtilTest {
   public void testCleanupIndexOpWithDfsDir() throws IOException {
     // And a "unique" tmp directory for each volume
     File tmp1 = new File(accumuloDir, "tmp");
-    tmp1.mkdirs();
+    assertTrue(tmp1.mkdirs() || tmp1.isDirectory());
     Path tmpPath1 = new Path(tmp1.toURI());
 
     HashMap<Property,String> testProps = new HashMap<Property,String>();
@@ -102,17 +103,17 @@ public class FileUtilTest {
   @Test
   public void testCleanupIndexOpWithCommonParentVolume() throws IOException {
     File volumeDir = new File(accumuloDir, "volumes");
-    volumeDir.mkdirs();
+    assertTrue(volumeDir.mkdirs() || volumeDir.isDirectory());
 
     // Make some directories to simulate multiple volumes
     File v1 = new File(volumeDir, "v1"), v2 = new File(volumeDir, "v2");
-    v1.mkdirs();
-    v2.mkdirs();
+    assertTrue(v1.mkdirs() || v1.isDirectory());
+    assertTrue(v2.mkdirs() || v2.isDirectory());
 
     // And a "unique" tmp directory for each volume
     File tmp1 = new File(v1, "tmp"), tmp2 = new File(v2, "tmp");
-    tmp1.mkdirs();
-    tmp2.mkdirs();
+    assertTrue(tmp1.mkdirs() || tmp1.isDirectory());
+    assertTrue(tmp2.mkdirs() || tmp2.isDirectory());
     Path tmpPath1 = new Path(tmp1.toURI()), tmpPath2 = new Path(tmp2.toURI());
 
     HashMap<Property,String> testProps = new HashMap<Property,String>();
@@ -133,18 +134,18 @@ public class FileUtilTest {
   @Test
   public void testCleanupIndexOpWithCommonParentVolumeWithDepth() throws IOException {
     File volumeDir = new File(accumuloDir, "volumes");
-    volumeDir.mkdirs();
+    assertTrue(volumeDir.mkdirs() || volumeDir.isDirectory());
 
     // Make some directories to simulate multiple volumes
     File v1 = new File(volumeDir, "v1"), v2 = new File(volumeDir, "v2");
-    v1.mkdirs();
-    v2.mkdirs();
+    assertTrue(v1.mkdirs() || v1.isDirectory());
+    assertTrue(v2.mkdirs() || v2.isDirectory());
 
     // And a "unique" tmp directory for each volume
     // Make sure we can handle nested directories (a single tmpdir with potentially multiple unique dirs)
     File tmp1 = new File(new File(v1, "tmp"), "tmp_1"), tmp2 = new File(new File(v2, "tmp"), "tmp_1");
-    tmp1.mkdirs();
-    tmp2.mkdirs();
+    assertTrue(tmp1.mkdirs() || tmp1.isDirectory());
+    assertTrue(tmp2.mkdirs() || tmp2.isDirectory());
     Path tmpPath1 = new Path(tmp1.toURI()), tmpPath2 = new Path(tmp2.toURI());
 
     HashMap<Property,String> testProps = new HashMap<Property,String>();
@@ -166,13 +167,13 @@ public class FileUtilTest {
   public void testCleanupIndexOpWithoutCommonParentVolume() throws IOException {
     // Make some directories to simulate multiple volumes
     File v1 = new File(accumuloDir, "v1"), v2 = new File(accumuloDir, "v2");
-    v1.mkdirs();
-    v2.mkdirs();
+    assertTrue(v1.mkdirs() || v1.isDirectory());
+    assertTrue(v2.mkdirs() || v2.isDirectory());
 
     // And a "unique" tmp directory for each volume
     File tmp1 = new File(v1, "tmp"), tmp2 = new File(v2, "tmp");
-    tmp1.mkdirs();
-    tmp2.mkdirs();
+    assertTrue(tmp1.mkdirs() || tmp1.isDirectory());
+    assertTrue(tmp2.mkdirs() || tmp2.isDirectory());
     Path tmpPath1 = new Path(tmp1.toURI()), tmpPath2 = new Path(tmp2.toURI());
 
     HashMap<Property,String> testProps = new HashMap<Property,String>();
@@ -194,14 +195,14 @@ public class FileUtilTest {
   public void testCleanupIndexOpWithoutCommonParentVolumeWithDepth() throws IOException {
     // Make some directories to simulate multiple volumes
     File v1 = new File(accumuloDir, "v1"), v2 = new File(accumuloDir, "v2");
-    v1.mkdirs();
-    v2.mkdirs();
+    assertTrue(v1.mkdirs() || v1.isDirectory());
+    assertTrue(v2.mkdirs() || v2.isDirectory());
 
     // And a "unique" tmp directory for each volume
     // Make sure we can handle nested directories (a single tmpdir with potentially multiple unique dirs)
     File tmp1 = new File(new File(v1, "tmp"), "tmp_1"), tmp2 = new File(new File(v2, "tmp"), "tmp_1");
-    tmp1.mkdirs();
-    tmp2.mkdirs();
+    assertTrue(tmp1.mkdirs() || tmp1.isDirectory());
+    assertTrue(tmp2.mkdirs() || tmp2.isDirectory());
     Path tmpPath1 = new Path(tmp1.toURI()), tmpPath2 = new Path(tmp2.toURI());
 
     HashMap<Property,String> testProps = new HashMap<Property,String>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/gc/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/server/gc/src/main/findbugs/exclude-filter.xml b/server/gc/src/main/findbugs/exclude-filter.xml
index c801230..0a34e52 100644
--- a/server/gc/src/main/findbugs/exclude-filter.xml
+++ b/server/gc/src/main/findbugs/exclude-filter.xml
@@ -15,4 +15,9 @@
   limitations under the License.
 -->
 <FindBugsFilter>
+  <Match>
+    <!-- admin classes can call System.exit -->
+    <Class name="org.apache.accumulo.gc.SimpleGarbageCollector" />
+    <Bug code="DM" pattern="DM_EXIT" />
+  </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/master/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/server/master/src/main/findbugs/exclude-filter.xml b/server/master/src/main/findbugs/exclude-filter.xml
index 5f34cf3..32f3c4b 100644
--- a/server/master/src/main/findbugs/exclude-filter.xml
+++ b/server/master/src/main/findbugs/exclude-filter.xml
@@ -20,4 +20,24 @@
     <Class name="org.apache.accumulo.master.Master" />
     <Bug code="UW" pattern="UW_UNCOND_WAIT" />
   </Match>
+  <Match>
+    <!-- shouldn't close the given I/O streams, because they are just wrapped -->
+    <Class name="org.apache.accumulo.master.tableOps.ImportTable" />
+    <Method name="checkVersions" params="org.apache.accumulo.master.Master" returns="void" />
+    <Bug code="OS" pattern="OS_OPEN_STREAM" />
+  </Match>
+  <Match>
+    <!-- shouldn't close the given I/O streams, because they are just wrapped -->
+    <Class name="org.apache.accumulo.master.tableOps.WriteExportFiles" />
+    <Method name="exportTable" params="org.apache.accumulo.server.fs.VolumeManager,org.apache.accumulo.server.AccumuloServerContext,java.lang.String,java.lang.String,java.lang.String" returns="void" />
+    <Bug code="OS" pattern="OS_OPEN_STREAM" />
+  </Match>
+  <Match>
+    <!-- admin classes can call System.exit -->
+    <Or>
+      <Class name="org.apache.accumulo.master.Master" />
+      <Class name="org.apache.accumulo.master.Master$2" />
+    </Or>
+    <Bug code="DM" pattern="DM_EXIT" />
+  </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 755e322..d097d75 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -33,6 +33,7 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
@@ -566,7 +567,7 @@ class TabletGroupWatcher extends Daemon {
             + Path.SEPARATOR + extent.getTableId() + Constants.DEFAULT_TABLET_LOCATION;
         MetadataTableUtil.addTablet(new KeyExtent(extent.getTableId(), null, extent.getPrevEndRow()), tdir, master, timeType, this.master.masterLock);
       }
-    } catch (Exception ex) {
+    } catch (RuntimeException | IOException | TableNotFoundException | AccumuloSecurityException ex) {
       throw new AccumuloException(ex);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java b/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
index 1b37968..4e3a079 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/DistributedWorkQueueWorkAssigner.java
@@ -152,6 +152,7 @@ public abstract class DistributedWorkQueueWorkAssigner implements WorkAssigner {
     try {
       s = ReplicationTable.getScanner(conn);
     } catch (ReplicationTableOfflineException e) {
+      // no work to do; replication is off
       return;
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/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 e40137b..40cd29f 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
@@ -74,7 +74,6 @@ import org.apache.accumulo.server.tablets.UniqueNameAllocator;
 import org.apache.accumulo.server.util.MetadataTableUtil;
 import org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher.ZooArbitrator;
-import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
@@ -409,17 +408,13 @@ class CopyFailed extends MasterRepo {
     HashMap<FileRef,String> failures = new HashMap<FileRef,String>();
     HashMap<FileRef,String> loadedFailures = new HashMap<FileRef,String>();
 
-    FSDataInputStream failFile = fs.open(new Path(error, BulkImport.FAILURES_TXT));
-    BufferedReader in = new BufferedReader(new InputStreamReader(failFile, UTF_8));
-    try {
+    try (BufferedReader in = new BufferedReader(new InputStreamReader(fs.open(new Path(error, BulkImport.FAILURES_TXT)), UTF_8))) {
       String line = null;
       while ((line = in.readLine()) != null) {
         Path path = new Path(line);
         if (!fs.exists(new Path(error, path.getName())))
           failures.put(new FileRef(line, path), line);
       }
-    } finally {
-      failFile.close();
     }
 
     /*

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
index 979954b..c9b9673 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/ImportTable.java
@@ -595,15 +595,10 @@ public class ImportTable extends MasterRepo {
 
   public void checkVersions(Master env) throws ThriftTableOperationException {
     Path path = new Path(tableInfo.exportDir, Constants.EXPORT_FILE);
+    Integer exportVersion = null;
+    Integer dataVersion = null;
 
-    ZipInputStream zis = null;
-
-    try {
-      zis = new ZipInputStream(env.getFileSystem().open(path));
-
-      Integer exportVersion = null;
-      Integer dataVersion = null;
-
+    try (ZipInputStream zis = new ZipInputStream(env.getFileSystem().open(path))) {
       ZipEntry zipEntry;
       while ((zipEntry = zis.getNextEntry()) != null) {
         if (zipEntry.getName().equals(Constants.EXPORT_INFO_FILE)) {
@@ -617,34 +612,22 @@ public class ImportTable extends MasterRepo {
               dataVersion = Integer.parseInt(sa[1]);
             }
           }
-
           break;
         }
       }
-
-      zis.close();
-      zis = null;
-
-      if (exportVersion == null || exportVersion > ExportTable.VERSION)
-        throw new ThriftTableOperationException(null, tableInfo.tableName, TableOperation.IMPORT, TableOperationExceptionType.OTHER,
-            "Incompatible export version " + exportVersion);
-
-      if (dataVersion == null || dataVersion > ServerConstants.DATA_VERSION)
-        throw new ThriftTableOperationException(null, tableInfo.tableName, TableOperation.IMPORT, TableOperationExceptionType.OTHER,
-            "Incompatible data version " + exportVersion);
-
     } catch (IOException ioe) {
       log.warn(ioe.getMessage(), ioe);
       throw new ThriftTableOperationException(null, tableInfo.tableName, TableOperation.IMPORT, TableOperationExceptionType.OTHER,
           "Failed to read export metadata " + ioe.getMessage());
-    } finally {
-      if (zis != null)
-        try {
-          zis.close();
-        } catch (IOException ioe) {
-          log.warn(ioe.getMessage(), ioe);
-        }
     }
+
+    if (exportVersion == null || exportVersion > ExportTable.VERSION)
+      throw new ThriftTableOperationException(null, tableInfo.tableName, TableOperation.IMPORT, TableOperationExceptionType.OTHER,
+          "Incompatible export version " + exportVersion);
+
+    if (dataVersion == null || dataVersion > ServerConstants.DATA_VERSION)
+      throw new ThriftTableOperationException(null, tableInfo.tableName, TableOperation.IMPORT, TableOperationExceptionType.OTHER, "Incompatible data version "
+          + exportVersion);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
index 43f27bd..9388b7b 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
@@ -56,7 +56,7 @@ public class TraceRepo<T> implements Repo<T> {
     try {
       Repo<T> result = repo.call(tid, environment);
       if (result == null)
-        return result;
+        return null;
       return new TraceRepo<T>(result);
     } finally {
       span.stop();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
index 89e879e..436e0d3 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/ZooKeeperStatus.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.monitor;
 import static java.nio.charset.StandardCharsets.UTF_8;
 
 import java.util.Collection;
+import java.util.Objects;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -50,6 +51,16 @@ public class ZooKeeperStatus implements Runnable {
     }
 
     @Override
+    public int hashCode() {
+      return Objects.hashCode(keeper);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+      return obj == this || (obj != null && obj instanceof ZooKeeperState && 0 == compareTo((ZooKeeperState) obj));
+    }
+
+    @Override
     public int compareTo(ZooKeeperState other) {
       if (this == other) {
         return 0;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
index 02a0615..6dd9f52 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java
@@ -48,9 +48,9 @@ abstract public class BasicServlet extends HttpServlet {
   private static final long serialVersionUID = 1L;
   protected static final Logger log = Logger.getLogger(BasicServlet.class);
   static String cachedInstanceName = null;
-  private static String bannerText;
-  private static String bannerColor;
-  private static String bannerBackground;
+  private String bannerText;
+  private String bannerColor;
+  private String bannerBackground;
 
   abstract protected String getTitle(HttpServletRequest req);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/JSONServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/JSONServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/JSONServlet.java
index 224e1a1..dc75537 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/JSONServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/JSONServlet.java
@@ -37,8 +37,6 @@ import com.google.gson.Gson;
 public class JSONServlet extends BasicServlet {
   private static final long serialVersionUID = 1L;
 
-  private Gson gson = new Gson();
-
   @Override
   protected String getTitle(HttpServletRequest req) {
     return "JSON Report";
@@ -96,7 +94,7 @@ public class JSONServlet extends BasicServlet {
     }
 
     results.put("servers", servers);
-    sb.append(gson.toJson(results));
+    sb.append(new Gson().toJson(results));
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
index 7226476..b7cd827 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java
@@ -91,6 +91,8 @@ public class LogServlet extends BasicServlet {
   }
 
   private static class LogLevelType extends StringType<Level> {
+    private static final long serialVersionUID = 1L;
+
     @Override
     public String alignment() {
       return "center";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ProblemServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ProblemServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ProblemServlet.java
index 1b3e944..e78c26a 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ProblemServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ProblemServlet.java
@@ -79,7 +79,7 @@ public class ProblemServlet extends BasicServlet {
         row.add(entry.getKey());
         for (ProblemType pt : ProblemType.values()) {
           Integer pcount = entry.getValue().get(pt);
-          row.add(pcount == null ? 0 : pcount);
+          row.add(pcount == null ? Integer.valueOf(0) : pcount);
         }
         row.add(entry.getKey());
         problemSummary.addRow(row);
@@ -124,6 +124,7 @@ public class ProblemServlet extends BasicServlet {
   }
 
   private static class TableProblemLinkType extends StringType<String> {
+    private static final long serialVersionUID = 1L;
     private Map<String,String> tidToNameMap;
 
     public TableProblemLinkType(Map<String,String> tidToNameMap) {
@@ -140,12 +141,13 @@ public class ProblemServlet extends BasicServlet {
   }
 
   private static class ClearTableProblemsLinkType extends StringType<String> {
-    private HttpServletRequest req;
+    private static final long serialVersionUID = 1L;
+    private final String currentPage;
     private Map<String,String> tidToNameMap;
 
     public ClearTableProblemsLinkType(HttpServletRequest req, Map<String,String> tidToNameMap) {
-      this.req = req;
       this.tidToNameMap = tidToNameMap;
+      this.currentPage = currentPage(req);
     }
 
     @Override
@@ -158,16 +160,17 @@ public class ProblemServlet extends BasicServlet {
       if (obj == null)
         return "-";
       String table = String.valueOf(obj);
-      return String.format("<a href='/op?table=%s&action=clearTableProblems&redir=%s'>clear ALL %s problems</a>", encode(table), currentPage(req),
+      return String.format("<a href='/op?table=%s&action=clearTableProblems&redir=%s'>clear ALL %s problems</a>", encode(table), currentPage,
           Tables.getPrintableTableNameFromId(tidToNameMap, table));
     }
   }
 
   private static class ClearProblemLinkType extends CellType<ProblemReport> {
-    private HttpServletRequest req;
+    private static final long serialVersionUID = 1L;
+    private final String currentPage;
 
     public ClearProblemLinkType(HttpServletRequest req) {
-      this.req = req;
+      this.currentPage = currentPage(req);
     }
 
     @Override
@@ -181,7 +184,7 @@ public class ProblemServlet extends BasicServlet {
         return "-";
       ProblemReport p = (ProblemReport) obj;
       return String.format("<a href='/op?table=%s&action=clearProblem&redir=%s&resource=%s&ptype=%s'>clear this problem</a>", encode(p.getTableName()),
-          currentPage(req), encode(p.getResource()), encode(p.getProblemType().name()));
+          currentPage, encode(p.getResource()), encode(p.getProblemType().name()));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java
index 97061b5..01bd23a 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ReplicationServlet.java
@@ -48,10 +48,15 @@ public class ReplicationServlet extends BasicServlet {
 
   private static final long serialVersionUID = 1L;
 
-  private ReplicationUtil replicationUtil;
+  // transient because it's not serializable and servlets are serializable
+  private transient volatile ReplicationUtil replicationUtil = null;
 
-  public ReplicationServlet() {
-    replicationUtil = new ReplicationUtil(Monitor.getContext());
+  private synchronized ReplicationUtil getReplicationUtil() {
+    // make transient replicationUtil available as needed
+    if (replicationUtil == null) {
+      replicationUtil = new ReplicationUtil(Monitor.getContext());
+    }
+    return replicationUtil;
   }
 
   @Override
@@ -65,7 +70,7 @@ public class ReplicationServlet extends BasicServlet {
     final MasterMonitorInfo mmi = Monitor.getMmi();
 
     // The total number of "slots" we have to replicate data
-    int totalWorkQueueSize = replicationUtil.getMaxReplicationThreads(mmi);
+    int totalWorkQueueSize = getReplicationUtil().getMaxReplicationThreads(mmi);
 
     TableOperations tops = conn.tableOperations();
     if (!ReplicationTable.isOnline(conn)) {
@@ -80,16 +85,16 @@ public class ReplicationServlet extends BasicServlet {
     replicationStats.addSortableColumn("ReplicaSystem Type");
     replicationStats.addSortableColumn("Files needing replication", new NumberType<Long>(), null);
 
-    Map<String,String> peers = replicationUtil.getPeers();
+    Map<String,String> peers = getReplicationUtil().getPeers();
 
     // The total set of configured targets
-    Set<ReplicationTarget> allConfiguredTargets = replicationUtil.getReplicationTargets();
+    Set<ReplicationTarget> allConfiguredTargets = getReplicationUtil().getReplicationTargets();
 
     // Number of files per target we have to replicate
-    Map<ReplicationTarget,Long> targetCounts = replicationUtil.getPendingReplications();
+    Map<ReplicationTarget,Long> targetCounts = getReplicationUtil().getPendingReplications();
 
     Map<String,String> tableNameToId = tops.tableIdMap();
-    Map<String,String> tableIdToName = replicationUtil.invert(tableNameToId);
+    Map<String,String> tableIdToName = getReplicationUtil().invert(tableNameToId);
 
     long filesPendingOverAllTargets = 0l;
     for (ReplicationTarget configuredTarget : allConfiguredTargets) {
@@ -146,8 +151,8 @@ public class ReplicationServlet extends BasicServlet {
         String filename = queueKeyPair.getKey();
         ReplicationTarget target = queueKeyPair.getValue();
 
-        String path = replicationUtil.getAbsolutePath(conn, workQueuePath, queueKey);
-        String progress = replicationUtil.getProgress(conn, path, target);
+        String path = getReplicationUtil().getAbsolutePath(conn, workQueuePath, queueKey);
+        String progress = getReplicationUtil().getProgress(conn, path, target);
 
         // Add a row in the table
         replicationInProgress.addRow(null == path ? ".../" + filename : path, target.getPeerName(), target.getSourceTableId(), target.getRemoteIdentifier(),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ShellServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ShellServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ShellServlet.java
index 55145f9..8268c4f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ShellServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/ShellServlet.java
@@ -40,8 +40,22 @@ import org.apache.accumulo.shell.Shell;
 
 public class ShellServlet extends BasicServlet {
   private static final long serialVersionUID = 1L;
-  private Map<String,ShellExecutionThread> userShells = new HashMap<String,ShellExecutionThread>();
-  private ExecutorService service = Executors.newCachedThreadPool();
+  private transient volatile Map<String,ShellExecutionThread> userShells = null;
+  private transient volatile ExecutorService service = null;
+
+  private synchronized Map<String,ShellExecutionThread> userShells() {
+    if (userShells == null) {
+      userShells = new HashMap<String,ShellExecutionThread>();
+    }
+    return userShells;
+  }
+
+  private synchronized ExecutorService service() {
+    if (service == null) {
+      service = Executors.newCachedThreadPool();
+    }
+    return service;
+  }
 
   public static final String CSRF_KEY = "csrf_token";
 
@@ -80,8 +94,8 @@ public class ShellServlet extends BasicServlet {
       try {
         // get a new shell for this user
         ShellExecutionThread shellThread = new ShellExecutionThread(user, pass, mock);
-        service.submit(shellThread);
-        userShells.put(session.getId(), shellThread);
+        service().submit(shellThread);
+        userShells().put(session.getId(), shellThread);
       } catch (IOException e) {
         // error validating user, reauthenticate
         sb.append("<div id='loginError'>Invalid user/password</div>" + authenticationForm(req.getRequestURI(), CSRF_TOKEN));
@@ -89,13 +103,13 @@ public class ShellServlet extends BasicServlet {
       }
       session.setAttribute("user", user);
     }
-    if (!userShells.containsKey(session.getId())) {
+    if (!userShells().containsKey(session.getId())) {
       // no existing shell for this user, re-authenticate
       sb.append(authenticationForm(req.getRequestURI(), UUID.randomUUID().toString()));
       return;
     }
 
-    ShellExecutionThread shellThread = userShells.get(session.getId());
+    ShellExecutionThread shellThread = userShells().get(session.getId());
     shellThread.getOutput();
     shellThread.printInfo();
     sb.append("<div id='shell'>\n");
@@ -171,7 +185,7 @@ public class ShellServlet extends BasicServlet {
   protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
     final HttpSession session = req.getSession(true);
     String user = (String) session.getAttribute("user");
-    if (user == null || !userShells.containsKey(session.getId())) {
+    if (user == null || !userShells().containsKey(session.getId())) {
       // no existing shell for user, re-authenticate
       doGet(req, resp);
       return;
@@ -181,7 +195,7 @@ public class ShellServlet extends BasicServlet {
       // no csrf token, need to re-auth
       doGet(req, resp);
     }
-    ShellExecutionThread shellThread = userShells.get(session.getId());
+    ShellExecutionThread shellThread = userShells().get(session.getId());
     String cmd = req.getParameter("cmd");
     if (cmd == null) {
       // the command is null, just print prompt
@@ -193,7 +207,7 @@ public class ShellServlet extends BasicServlet {
     shellThread.waitUntilReady();
     if (shellThread.isDone()) {
       // the command was exit, invalidate session
-      userShells.remove(session.getId());
+      userShells().remove(session.getId());
       session.invalidate();
       return;
     }
@@ -302,7 +316,9 @@ public class ShellServlet extends BasicServlet {
         cmdIndex = 0;
         try {
           shell.execCommand(tcmd, false, true);
-        } catch (IOException e) {}
+        } catch (IOException e) {
+          // ignored
+        }
         this.notifyAll();
       }
       done = true;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
index 47a2ca0..5ead979 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/TServersServlet.java
@@ -63,6 +63,8 @@ public class TServersServlet extends BasicServlet {
 
   static class SecondType extends NumberType<Double> {
 
+    private static final long serialVersionUID = 1L;
+
     @Override
     public String format(Object obj) {
       if (obj == null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/NullKeyValueIterator.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/NullKeyValueIterator.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/NullKeyValueIterator.java
index 1ec7bfc..1a72b4b 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/NullKeyValueIterator.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/NullKeyValueIterator.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.monitor.servlets.trace;
 
 import java.util.Iterator;
 import java.util.Map.Entry;
+import java.util.NoSuchElementException;
 
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
@@ -31,7 +32,7 @@ public class NullKeyValueIterator implements Iterator<Entry<Key,Value>> {
 
   @Override
   public Entry<Key,Value> next() {
-    return null;
+    throw new NoSuchElementException(getClass().getName() + " contains no elements");
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTraceLinkType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTraceLinkType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTraceLinkType.java
index f7a0e1d..f731a05 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTraceLinkType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTraceLinkType.java
@@ -26,6 +26,8 @@ import org.apache.accumulo.tracer.thrift.RemoteSpan;
  *
  */
 public class ShowTraceLinkType extends StringType<RemoteSpan> {
+  private static final long serialVersionUID = 1L;
+
   @Override
   public String format(Object obj) {
     if (obj == null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Summary.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Summary.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Summary.java
index 75541be..9c9d170 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Summary.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/Summary.java
@@ -78,6 +78,7 @@ public class Summary extends Basic {
 
   private static class ShowTypeLink extends StringType<String> {
 
+    private static final long serialVersionUID = 1L;
     int minutes;
 
     public ShowTypeLink(int minutes) {
@@ -95,6 +96,8 @@ public class Summary extends Basic {
   }
 
   static private class HistogramType extends StringType<Stats> {
+    private static final long serialVersionUID = 1L;
+
     @Override
     public String format(Object obj) {
       Stats stat = (Stats) obj;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CellType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CellType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CellType.java
index 71aa317..5dcdf12 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CellType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CellType.java
@@ -16,9 +16,12 @@
  */
 package org.apache.accumulo.monitor.util.celltypes;
 
+import java.io.Serializable;
 import java.util.Comparator;
 
-public abstract class CellType<T> implements Comparator<T> {
+public abstract class CellType<T> implements Comparator<T>, Serializable {
+
+  private static final long serialVersionUID = 1L;
   private boolean sortable = true;
 
   abstract public String alignment();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CompactionsType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CompactionsType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CompactionsType.java
index e649b84..cf65355 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CompactionsType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/CompactionsType.java
@@ -21,6 +21,7 @@ import org.apache.accumulo.core.master.thrift.TableInfo;
 
 public class CompactionsType extends CellType<TableInfo> {
 
+  private static final long serialVersionUID = 1L;
   private String fieldName;
 
   public CompactionsType(String which) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DateTimeType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DateTimeType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DateTimeType.java
index 5a8ca58..78a863f 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DateTimeType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DateTimeType.java
@@ -22,6 +22,7 @@ import java.util.Date;
 import java.util.Locale;
 
 public class DateTimeType extends CellType<Long> {
+  private static final long serialVersionUID = 1L;
   private SimpleDateFormat simple;
   private int dateFormat;
   private int timeFormat;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DurationType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DurationType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DurationType.java
index 65dd214..f1ba9ed 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DurationType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/DurationType.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.monitor.util.celltypes;
 import org.apache.accumulo.core.util.Duration;
 
 public class DurationType extends NumberType<Long> {
+  private static final long serialVersionUID = 1L;
   private Long errMin;
   private Long errMax;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/NumberType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/NumberType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/NumberType.java
index f00ad67..b2de91e 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/NumberType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/NumberType.java
@@ -20,6 +20,7 @@ import static org.apache.accumulo.core.util.NumUtil.bigNumberForQuantity;
 
 public class NumberType<T extends Number> extends CellType<T> {
 
+  private static final long serialVersionUID = 1L;
   protected final T warnMin, warnMax, errMin, errMax;
 
   public NumberType(T warnMin, T warnMax, T errMin, T errMax) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PercentageType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PercentageType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PercentageType.java
index 462e33d..658f132 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PercentageType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PercentageType.java
@@ -18,6 +18,8 @@ package org.apache.accumulo.monitor.util.celltypes;
 
 public class PercentageType extends CellType<Double> {
 
+  private static final long serialVersionUID = 1L;
+
   @Override
   public int compare(Double o1, Double o2) {
     return o1.compareTo(o2);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PreciseNumberType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PreciseNumberType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PreciseNumberType.java
index 775e8dd..bc9b036 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PreciseNumberType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/PreciseNumberType.java
@@ -18,6 +18,8 @@ package org.apache.accumulo.monitor.util.celltypes;
 
 public class PreciseNumberType extends NumberType<Integer> {
 
+  private static final long serialVersionUID = 1L;
+
   public PreciseNumberType(int warnMin, int warnMax, int errMin, int errMax) {
     super(warnMin, warnMax, errMin, errMax);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/ProgressChartType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/ProgressChartType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/ProgressChartType.java
index 20836fd..022b446 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/ProgressChartType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/ProgressChartType.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.monitor.util.celltypes;
 
 public class ProgressChartType extends NumberType<Double> {
 
+  private static final long serialVersionUID = 1L;
   private double max;
 
   public ProgressChartType() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/StringType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/StringType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/StringType.java
index 79f8d5e..5cdc1f4 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/StringType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/StringType.java
@@ -17,6 +17,8 @@
 package org.apache.accumulo.monitor.util.celltypes;
 
 public class StringType<T> extends CellType<T> {
+  private static final long serialVersionUID = 1L;
+
   @Override
   public String format(Object obj) {
     return obj == null ? "-" : obj.toString();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TServerLinkType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TServerLinkType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TServerLinkType.java
index be3f527..e6e25ff 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TServerLinkType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TServerLinkType.java
@@ -20,6 +20,8 @@ import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 
 public class TServerLinkType extends CellType<TabletServerStatus> {
 
+  private static final long serialVersionUID = 1L;
+
   @Override
   public String format(Object obj) {
     if (obj == null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableLinkType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableLinkType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableLinkType.java
index 0d176f2..11e46e2 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableLinkType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableLinkType.java
@@ -24,6 +24,7 @@ import org.apache.accumulo.server.client.HdfsZooInstance;
 
 public class TableLinkType extends CellType<String> {
 
+  private static final long serialVersionUID = 1L;
   private Map<String,String> tidToNameMap;
 
   public TableLinkType() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableStateType.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableStateType.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableStateType.java
index 724d220..54a6eb6 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableStateType.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/celltypes/TableStateType.java
@@ -20,6 +20,8 @@ import org.apache.accumulo.core.master.state.tables.TableState;
 
 public class TableStateType extends CellType<TableState> {
 
+  private static final long serialVersionUID = 1L;
+
   @Override
   public String alignment() {
     return "center";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tracer/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/findbugs/exclude-filter.xml b/server/tracer/src/main/findbugs/exclude-filter.xml
index 281610d..f6a7fe4 100644
--- a/server/tracer/src/main/findbugs/exclude-filter.xml
+++ b/server/tracer/src/main/findbugs/exclude-filter.xml
@@ -17,6 +17,6 @@
 <FindBugsFilter>
   <Match>
     <!-- ignore thrift-generated classes -->
-    <Class name="~org\.apache\.accumulo\.tracer\.thrift\..*" />
+    <Package name="org.apache.accumulo.tracer.thrift" />
   </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
index 3e4cded..5e921d4 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceServer.java
@@ -212,7 +212,7 @@ public class TraceServer implements Watcher {
         }
         connector.tableOperations().setProperty(table, Property.TABLE_FORMATTER_CLASS.getKey(), TraceFormatter.class.getName());
         break;
-      } catch (Exception ex) {
+      } catch (RuntimeException ex) {
         log.info("Waiting to checking/create the trace table.", ex);
         UtilWaitThread.sleep(1000);
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/findbugs/exclude-filter.xml b/server/tserver/src/main/findbugs/exclude-filter.xml
index aec413a..47dd1f5 100644
--- a/server/tserver/src/main/findbugs/exclude-filter.xml
+++ b/server/tserver/src/main/findbugs/exclude-filter.xml
@@ -21,4 +21,10 @@
     <Method name="beginUpdatingLogsUsed" params="org.apache.accumulo.tserver.InMemoryMap,java.util.Collection,boolean" returns="boolean" />
     <Bug code="UL" pattern="UL_UNRELEASED_LOCK" />
   </Match>
+  <Match>
+    <!-- false positive about forced garbage collection in resource manager -->
+    <Class name="org.apache.accumulo.tserver.TabletServerResourceManager" />
+    <Method name="&lt;init&gt;" params="org.apache.accumulo.tserver.TabletServer,org.apache.accumulo.server.fs.VolumeManager" returns="void" />
+    <Bug code="DM" pattern="DM_GC" />
+  </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
index 67e5652..3567de8 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
@@ -309,6 +309,11 @@ public class TabletServerResourceManager {
     public long getMinorCompactingMemTableSize() {
       return mcmts;
     }
+
+    @Override
+    public TabletStateImpl clone() throws CloneNotSupportedException {
+      return (TabletStateImpl) super.clone();
+    }
   }
 
   private class MemoryManagementFramework {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
index 900600f..444a97f 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compaction/MajorCompactionRequest.java
@@ -100,4 +100,9 @@ public class MajorCompactionRequest implements Cloneable {
   public int getMaxFilesPerTablet() {
     return tableConfig.getMaxFilesPerTablet();
   }
+
+  @Override
+  public MajorCompactionRequest clone() throws CloneNotSupportedException {
+    return (MajorCompactionRequest) super.clone();
+  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/log/MultiReader.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/MultiReader.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/MultiReader.java
index 174ee4d..44605bb 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/MultiReader.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/MultiReader.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.tserver.log;
 
 import java.io.EOFException;
 import java.io.IOException;
+import java.util.Objects;
 
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.log.SortedLogState;
@@ -71,6 +72,16 @@ public class MultiReader {
     }
 
     @Override
+    public int hashCode() {
+      return Objects.hashCode(key);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+      return this == obj || (obj != null && obj instanceof Index && 0 == compareTo((Index) obj));
+    }
+
+    @Override
     public int compareTo(Index o) {
       try {
         cache();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMBeanImpl.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMBeanImpl.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMBeanImpl.java
index b472065..e6973fd 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMBeanImpl.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMBeanImpl.java
@@ -27,7 +27,7 @@ import org.apache.log4j.Logger;
 public class TabletServerMBeanImpl extends AbstractMetricsImpl implements TabletServerMBean {
   private static final Logger log = Logger.getLogger(TabletServerMBeanImpl.class);
   private static final String METRICS_PREFIX = "tserver";
-  private static ObjectName OBJECT_NAME = null;
+  private ObjectName OBJECT_NAME = null;
 
   private final TabletServerMetricsUtil util;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetrics.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetrics.java
index f4d61ca..50fb6a0 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMinCMetrics.java
@@ -26,7 +26,7 @@ public class TabletServerMinCMetrics extends AbstractMetricsImpl implements Tabl
 
   private static final String METRICS_PREFIX = "tserver.minc";
 
-  private static ObjectName OBJECT_NAME = null;
+  private ObjectName OBJECT_NAME = null;
 
   TabletServerMinCMetrics() {
     super();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetrics.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetrics.java
index 6bcabfd..80ee71f 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerScanMetrics.java
@@ -26,7 +26,7 @@ public class TabletServerScanMetrics extends AbstractMetricsImpl implements Tabl
 
   public static final String METRICS_PREFIX = "tserver.scan";
 
-  static ObjectName OBJECT_NAME = null;
+  ObjectName OBJECT_NAME = null;
 
   TabletServerScanMetrics() {
     super();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetrics.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetrics.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetrics.java
index 48b78b0..746b393 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerUpdateMetrics.java
@@ -26,7 +26,7 @@ public class TabletServerUpdateMetrics extends AbstractMetricsImpl implements Ta
 
   private static final String METRICS_PREFIX = "tserver.update";
 
-  private static ObjectName OBJECT_NAME = null;
+  private ObjectName OBJECT_NAME = null;
 
   TabletServerUpdateMetrics() {
     super();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactionRunner.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactionRunner.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactionRunner.java
index 53cc750..a5f618d 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactionRunner.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactionRunner.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver.tablet;
 
+import java.util.Objects;
+
 import org.apache.accumulo.tserver.compaction.MajorCompactionReason;
 
 final class CompactionRunner implements Runnable, Comparable<CompactionRunner> {
@@ -59,6 +61,16 @@ final class CompactionRunner implements Runnable, Comparable<CompactionRunner> {
   }
 
   @Override
+  public int hashCode() {
+    return Objects.hashCode(reason) + Objects.hashCode(queued) + getNumFiles();
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    return this == obj || (obj != null && obj instanceof CompactionRunner && 0 == compareTo((CompactionRunner) obj));
+  }
+
+  @Override
   public int compareTo(CompactionRunner o) {
     int cmp = reason.compareTo(o.reason);
     if (cmp != 0)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
index 67cdb04..f842a68 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/SortedLogRecoveryTest.java
@@ -31,6 +31,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Set;
 import java.util.TreeMap;
 
@@ -70,6 +71,16 @@ public class SortedLogRecoveryTest {
     }
 
     @Override
+    public int hashCode() {
+      return Objects.hashCode(key) + Objects.hashCode(value);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+      return this == obj || (obj != null && obj instanceof KeyValue && 0 == compareTo((KeyValue) obj));
+    }
+
+    @Override
     public int compareTo(KeyValue o) {
       return key.compareTo(o.key);
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/test/java/org/apache/accumulo/tserver/log/TestUpgradePathForWALogs.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/TestUpgradePathForWALogs.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/TestUpgradePathForWALogs.java
index 45d3e73..b5c1e0c 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/TestUpgradePathForWALogs.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/TestUpgradePathForWALogs.java
@@ -17,6 +17,8 @@
 
 package org.apache.accumulo.tserver.log;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -49,10 +51,10 @@ public class TestUpgradePathForWALogs {
   @BeforeClass
   public static void createTestDirectory() {
     File baseDir = new File(System.getProperty("user.dir") + "/target/upgrade-tests");
-    baseDir.mkdirs();
+    assertTrue(baseDir.mkdirs() || baseDir.isDirectory());
     testDir = new File(baseDir, TestUpgradePathForWALogs.class.getName());
     FileUtils.deleteQuietly(testDir);
-    testDir.mkdir();
+    assertTrue(testDir.mkdir() || testDir.isDirectory());
   }
 
   @Rule

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/RootFilesTest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/RootFilesTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/RootFilesTest.java
index 743cfc2..ea8874a 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/RootFilesTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/RootFilesTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver.tablet;
 
+import static org.junit.Assert.assertTrue;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
@@ -57,18 +59,18 @@ public class RootFilesTest {
       this.conf = conf;
 
       rootTabletDir = new File(tempFolder.newFolder(), "accumulo/tables/+r/root_tablet");
-      rootTabletDir.mkdirs();
+      assertTrue(rootTabletDir.mkdirs() || rootTabletDir.isDirectory());
       oldDatafiles = new HashSet<FileRef>();
       for (String filename : inputFiles) {
         File file = new File(rootTabletDir, filename);
-        file.createNewFile();
+        assertTrue(file.createNewFile());
         oldDatafiles.add(new FileRef(file.toURI().toString()));
       }
 
       this.compactName = compactName;
 
       File tmpFile = new File(rootTabletDir, compactName + "_tmp");
-      tmpFile.createNewFile();
+      assertTrue(tmpFile.createNewFile());
       tmpDatafile = new FileRef(tmpFile.toURI().toString());
 
       newDatafile = new FileRef(new File(rootTabletDir, compactName).toURI().toString());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/TabletTest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/TabletTest.java b/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/TabletTest.java
index c4969e6..930d432 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/TabletTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/tablet/TabletTest.java
@@ -73,11 +73,11 @@ public class TabletTest {
 
     EasyMock.verify(tableConf, plan, writeParams);
 
-    Assert.assertEquals(hdfsBlockSize, Long.valueOf(aConf.get(Property.TABLE_FILE_BLOCK_SIZE)).longValue());
-    Assert.assertEquals(blockSize, Long.valueOf(aConf.get(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE)).longValue());
-    Assert.assertEquals(indexBlockSize, Long.valueOf(aConf.get(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX)).longValue());
+    Assert.assertEquals(hdfsBlockSize, Long.parseLong(aConf.get(Property.TABLE_FILE_BLOCK_SIZE)));
+    Assert.assertEquals(blockSize, Long.parseLong(aConf.get(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE)));
+    Assert.assertEquals(indexBlockSize, Long.parseLong(aConf.get(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE_INDEX)));
     Assert.assertEquals(compressType, aConf.get(Property.TABLE_FILE_COMPRESSION_TYPE));
-    Assert.assertEquals(replication, Integer.valueOf(aConf.get(Property.TABLE_FILE_REPLICATION)).intValue());
+    Assert.assertEquals(replication, Integer.parseInt(aConf.get(Property.TABLE_FILE_REPLICATION)));
   }
 
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/shell/src/main/findbugs/exclude-filter.xml
----------------------------------------------------------------------
diff --git a/shell/src/main/findbugs/exclude-filter.xml b/shell/src/main/findbugs/exclude-filter.xml
index c801230..e21ccff 100644
--- a/shell/src/main/findbugs/exclude-filter.xml
+++ b/shell/src/main/findbugs/exclude-filter.xml
@@ -15,4 +15,9 @@
   limitations under the License.
 -->
 <FindBugsFilter>
+  <Match>
+    <!-- shell can call System.exit -->
+    <Class name="org.apache.accumulo.shell.Shell" />
+    <Bug code="DM" pattern="DM_EXIT" />
+  </Match>
 </FindBugsFilter>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/shell/src/main/java/org/apache/accumulo/shell/commands/ExtensionCommand.java
----------------------------------------------------------------------
diff --git a/shell/src/main/java/org/apache/accumulo/shell/commands/ExtensionCommand.java b/shell/src/main/java/org/apache/accumulo/shell/commands/ExtensionCommand.java
index 7dc457b..3cff189 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ExtensionCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ExtensionCommand.java
@@ -32,12 +32,13 @@ public class ExtensionCommand extends Command {
 
   protected Option enable, disable, list;
 
-  private static ServiceLoader<ShellExtension> extensions = null;
+  private ServiceLoader<ShellExtension> extensions = null;
 
   private Set<String> loadedHeaders = new HashSet<String>();
   private Set<String> loadedCommands = new HashSet<String>();
   private Set<String> loadedExtensions = new TreeSet<String>();
 
+  @Override
   public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
     if (cl.hasOption(enable.getOpt())) {
       extensions = ServiceLoader.load(ShellExtension.class);
@@ -74,10 +75,12 @@ public class ExtensionCommand extends Command {
     return 0;
   }
 
+  @Override
   public String description() {
     return "Enable, disable, or list shell extensions";
   }
 
+  @Override
   public int numArgs() {
     return 0;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/8158d39c/shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java
----------------------------------------------------------------------
diff --git a/shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java b/shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java
index ce05183..90b3028 100644
--- a/shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java
+++ b/shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java
@@ -34,6 +34,8 @@ import org.apache.log4j.Level;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.ParameterException;
 
@@ -42,6 +44,7 @@ public class ShellConfigTest {
   Shell shell;
   PrintStream out;
   File config;
+  private static final Logger log = LoggerFactory.getLogger(ShellConfigTest.class);
 
   @Before
   public void setUp() throws Exception {
@@ -62,7 +65,9 @@ public class ShellConfigTest {
     output.clear();
     System.setOut(out);
     if (config.exists()) {
-      config.delete();
+      if (!config.delete()) {
+        log.error("Unable to delete {}", config);
+      }
     }
   }
 


Mime
View raw message