accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1331388 - /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Date Fri, 27 Apr 2012 12:28:26 GMT
Author: ecn
Date: Fri Apr 27 12:28:25 2012
New Revision: 1331388

URL: http://svn.apache.org/viewvc?rev=1331388&view=rev
Log:
ACCUMULO-505: use the same mechanism to compute space in / and /accumulo

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

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java?rev=1331388&r1=1331387&r2=1331388&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Fri Apr 27 12:28:25 2012
@@ -269,9 +269,10 @@ public class DefaultServlet extends Basi
         Path path = new Path(ServerConfiguration.getSystemConfiguration().get(Property.INSTANCE_DFS_DIR));
         log.debug("Reading the content summary for " + path);
         ContentSummary acu = fs.getContentSummary(path);
-        consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / fs.getUsed());
+        ContentSummary rootSummary = fs.getContentSummary(new Path("/"));
+        consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / rootSummary.getSpaceConsumed());
         diskUsed = bytes(acu.getSpaceConsumed());
-        
+
         boolean highlight = false;
         tableRow(sb, (highlight = !highlight), "Disk Used", diskUsed);
         if (fs.getUsed() != 0)



Mime
View raw message