accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1325433 - /accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Date Thu, 12 Apr 2012 18:39:07 GMT
Author: ecn
Date: Thu Apr 12 18:39:07 2012
New Revision: 1325433

URL: http://svn.apache.org/viewvc?rev=1325433&view=rev
Log:
ACCUMULO-505 use consistent api calls to get space

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

Modified: accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java?rev=1325433&r1=1325432&r2=1325433&view=diff
==============================================================================
--- accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
(original)
+++ accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/DefaultServlet.java
Thu Apr 12 18:39:07 2012
@@ -252,7 +252,7 @@ public class DefaultServlet extends Basi
       try {
         ContentSummary all = fs.getContentSummary(new Path("/"));
         ContentSummary acu = fs.getContentSummary(new Path(AccumuloConfiguration.getSystemConfiguration().get(Property.INSTANCE_DFS_DIR)));
-        consumed = String.format("%.2f%%", acu.getSpaceConsumed() * 100. / all.getSpaceConsumed());
+        consumed = String.format("%.2f%%", acu.getLength() / (all.getLength() / 100.));
         diskUsed = bytes(acu.getSpaceConsumed());
       } catch (Exception e) {
         log.debug(e, e);



Mime
View raw message