You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2015/08/29 23:01:36 UTC

[1/2] accumulo git commit: ACCUMULO-3976 Automatic formatting commit.

Repository: accumulo
Updated Branches:
  refs/heads/master a50f80225 -> ffee9e5ae


ACCUMULO-3976 Automatic formatting commit.


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

Branch: refs/heads/master
Commit: 842b32837fb04b922bb14ca5f0d525e46f9db114
Parents: a50f802
Author: Josh Elser <el...@apache.org>
Authored: Sat Aug 29 16:56:52 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sat Aug 29 16:56:52 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/842b3283/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index be3c605..47fd57d 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -197,8 +197,8 @@ public class DfsLogger implements Comparable<DfsLogger> {
         }
         long duration = System.currentTimeMillis() - start;
         if (duration > slowFlushMillis) {
-          String msg = new StringBuilder(128).append("Slow sync cost: ").append(duration).append(" ms, current pipeline: ").append(Arrays.toString(getPipeLine()))
-              .toString();
+          String msg = new StringBuilder(128).append("Slow sync cost: ").append(duration).append(" ms, current pipeline: ")
+              .append(Arrays.toString(getPipeLine())).toString();
           log.info(msg);
         }
 


[2/2] accumulo git commit: ACCUMULO-3957 Remove getContentSummary calls in Monitor

Posted by el...@apache.org.
ACCUMULO-3957 Remove getContentSummary calls in Monitor

We previously had two getContentSummary calls used for computing
a metric of how much HDFS space Accumulo is using against total
available HDFS space. Users often got confused when seeing a very
large percentage, thinking that it was a total HDFS usage metric.

These getContentSummary calls against a large HDFS instance can
be very problematic, causes resource contention in the namenode.

Since the metric is questionable in value and the call may impact
performance, remove the calls and the metric.


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

Branch: refs/heads/master
Commit: ffee9e5ae557a43dfdca71478551f075213043c9
Parents: 842b328
Author: Josh Elser <el...@apache.org>
Authored: Sat Aug 29 16:59:29 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sat Aug 29 16:59:29 2015 -0400

----------------------------------------------------------------------
 .../monitor/servlets/DefaultServlet.java        | 48 --------------------
 1 file changed, 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ffee9e5a/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 21aba35..3d2ae45 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
@@ -251,55 +251,7 @@ public class DefaultServlet extends BasicServlet {
       long totalHdfsBytesUsed = 0l;
 
       try {
-        for (String baseDir : VolumeConfiguration.getVolumeUris(SiteConfiguration.getInstance())) {
-          final Path basePath = new Path(baseDir);
-          final FileSystem fs = vm.getVolumeByPath(basePath).getFileSystem();
-
-          try {
-            // Calculate the amount of space used by Accumulo on the FileSystem
-            ContentSummary accumuloSummary = fs.getContentSummary(basePath);
-            long bytesUsedByAcuOnFs = accumuloSummary.getLength();
-            totalAcuBytesUsed += bytesUsedByAcuOnFs;
-
-            // Catch the overflow -- this is big data
-            if (totalAcuBytesUsed < bytesUsedByAcuOnFs) {
-              log.debug("Overflowed long in bytes used by Accumulo for " + baseDir);
-              totalAcuBytesUsed = 0l;
-              break;
-            }
-
-            // Calculate the total amount of space used on the FileSystem
-            ContentSummary volumeSummary = fs.getContentSummary(new Path("/"));
-            long bytesUsedOnVolume = volumeSummary.getLength();
-            totalHdfsBytesUsed += bytesUsedOnVolume;
-
-            // Catch the overflow -- this is big data
-            if (totalHdfsBytesUsed < bytesUsedOnVolume) {
-              log.debug("Overflowed long in bytes used in HDFS for " + baseDir);
-              totalHdfsBytesUsed = 0;
-              break;
-            }
-          } catch (Exception ex) {
-            log.trace("Unable to get disk usage information for " + baseDir, ex);
-          }
-        }
-
-        String diskUsed = "Unknown";
-        String consumed = null;
-        if (totalAcuBytesUsed > 0) {
-          // Convert Accumulo usage to a readable String
-          diskUsed = bytes(totalAcuBytesUsed);
-
-          if (totalHdfsBytesUsed > 0) {
-            // Compute amount of space used by Accumulo as a percentage of total space usage.
-            consumed = String.format("%.2f%%", totalAcuBytesUsed * 100. / totalHdfsBytesUsed);
-          }
-        }
-
         boolean highlight = false;
-        tableRow(sb, (highlight = !highlight), "Disk&nbsp;Used", diskUsed);
-        if (null != consumed)
-          tableRow(sb, (highlight = !highlight), "%&nbsp;of&nbsp;Used&nbsp;DFS", consumed);
         tableRow(sb, (highlight = !highlight), "<a href='/tables'>Tables</a>", NumberType.commas(Monitor.getTotalTables()));
         tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Tablet&nbsp;Servers</a>", NumberType.commas(info.tServerInfo.size(), 1, Long.MAX_VALUE));
         tableRow(sb, (highlight = !highlight), "<a href='/tservers'>Dead&nbsp;Tablet&nbsp;Servers</a>", NumberType.commas(info.deadTabletServers.size(), 0, 0));