accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [12/12] accumulo git commit: ACCUMULO-4013 Cleanup unused code in DefaultServlet
Date Tue, 29 Sep 2015 23:12:48 GMT
ACCUMULO-4013 Cleanup unused code in DefaultServlet

Clean up vestigial code in DefaultServlet and fix compiler error from bad merge
of SendLogToChainsaw.


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

Branch: refs/heads/master
Commit: 0cbb1ea2771938f67b7d219f3d86aba766cb1746
Parents: 38c559a
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Sep 29 19:08:29 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Tue Sep 29 19:08:29 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/server/util/SendLogToChainsaw.java   |  4 ----
 .../apache/accumulo/monitor/servlets/DefaultServlet.java | 11 -----------
 2 files changed, 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0cbb1ea2/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
b/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
index ab11d89..d06bc4e 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java
@@ -128,10 +128,6 @@ public class SendLogToChainsaw extends XMLLayout {
         } catch (FileNotFoundException e) {
           System.out.println("Unable to find file: " + log.getAbsolutePath());
           throw e;
-        } finally {
-          if (isReader != null) {
-            isReader.close();
-          }
         }
         reader = new BufferedReader(new InputStreamReader(fis, UTF_8));
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0cbb1ea2/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/DefaultServlet.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/DefaultServlet.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/DefaultServlet.java
index aadcfe8..6d749ed 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/DefaultServlet.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/DefaultServlet.java
@@ -32,17 +32,13 @@ import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.util.Duration;
-import org.apache.accumulo.core.util.NumUtil;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.monitor.Monitor;
 import org.apache.accumulo.monitor.ZooKeeperStatus;
 import org.apache.accumulo.monitor.ZooKeeperStatus.ZooKeeperState;
 import org.apache.accumulo.monitor.util.celltypes.NumberType;
-import org.apache.accumulo.server.fs.VolumeManager;
-import org.apache.accumulo.server.fs.VolumeManagerImpl;
 
 public class DefaultServlet extends BasicServlet {
 
@@ -236,15 +232,12 @@ public class DefaultServlet extends BasicServlet {
 
   private void doAccumuloTable(StringBuilder sb) throws IOException {
     // Accumulo
-    VolumeManager vm = VolumeManagerImpl.get(SiteConfiguration.getInstance());
     MasterMonitorInfo info = Monitor.getMmi();
     sb.append("<table>\n");
     sb.append("<tr><th colspan='2'><a href='/master'>Accumulo Master</a></th></tr>\n");
     if (info == null) {
       sb.append("<tr><td colspan='2'><span class='error'>Master is Down</span></td></tr>\n");
     } else {
-      long totalAcuBytesUsed = 0l;
-      long totalHdfsBytesUsed = 0l;
 
       try {
         boolean highlight = false;
@@ -279,10 +272,6 @@ public class DefaultServlet extends BasicServlet {
     sb.append("</table>\n");
   }
 
-  private static String bytes(long big) {
-    return NumUtil.bigNumberForSize(big);
-  }
-
   public static void tableRow(StringBuilder sb, boolean highlight, Object... cells) {
     sb.append(highlight ? "<tr class='highlight'>" : "<tr>");
     for (int i = 0; i < cells.length; ++i) {


Mime
View raw message