accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [05/11] git commit: ACCUMULO-2184 Fix "Unknown" HDFS usage entry in "Accumulo Master" table on overview monitor page
Date Mon, 13 Jan 2014 17:58:30 GMT
ACCUMULO-2184 Fix "Unknown" HDFS usage entry in "Accumulo Master" table on overview monitor
page


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

Branch: refs/heads/master
Commit: 8e0e0e1f5b64a0c9ca2010796c7cff5d368da3cf
Parents: 1431d34
Author: Josh Elser <elserj@apache.org>
Authored: Mon Jan 13 12:35:27 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Mon Jan 13 12:35:27 2014 -0500

----------------------------------------------------------------------
 .../server/monitor/servlets/DefaultServlet.java         | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/8e0e0e1f/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
b/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
index 5603f69..eae0e81 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
@@ -265,10 +265,14 @@ public class DefaultServlet extends BasicServlet {
       try {
         Path path = new Path(ServerConfiguration.getSystemConfiguration().get(Property.INSTANCE_DFS_DIR));
         log.debug("Reading the content summary for " + path);
-        ContentSummary acu = fs.getContentSummary(path);
-        ContentSummary rootSummary = fs.getContentSummary(new Path("/"));
-        consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / rootSummary.getSpaceConsumed());
-        diskUsed = bytes(acu.getSpaceConsumed());
+        try {
+          ContentSummary acu = fs.getContentSummary(path);
+          diskUsed = bytes(acu.getSpaceConsumed());
+          ContentSummary rootSummary = fs.getContentSummary(new Path("/"));
+          consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / rootSummary.getSpaceConsumed());
+        } catch (Exception e) {
+          log.trace("Unable to get disk usage information from hdfs", ex);
+        }
 
         boolean highlight = false;
         tableRow(sb, (highlight = !highlight), "Disk&nbsp;Used", diskUsed);


Mime
View raw message