accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1468995 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Date Wed, 17 Apr 2013 16:49:02 GMT
Author: ecn
Date: Wed Apr 17 16:49:01 2013
New Revision: 1468995

URL: http://svn.apache.org/r1468995
Log:
ACCUMULO-1282 ignore permission problems getting disk usage information

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java?rev=1468995&r1=1468994&r2=1468995&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Wed Apr 17 16:49:01 2013
@@ -313,10 +313,14 @@ public class DefaultServlet extends Basi
       try {
         Path path = new Path(Monitor.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);
+          ContentSummary rootSummary = fs.getContentSummary(new Path("/"));
+          consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / rootSummary.getSpaceConsumed());
+          diskUsed = bytes(acu.getSpaceConsumed());
+        } catch (Exception ex) {
+          log.trace("Unable to get disk usage information from hdfs", ex);
+        }
         
         boolean highlight = false;
         tableRow(sb, (highlight = !highlight), "Disk Used", diskUsed);



Mime
View raw message