accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1452494 - in /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets: MasterServlet.java PreciseNumberType.java
Date Mon, 04 Mar 2013 20:35:31 GMT
Author: ecn
Date: Mon Mar  4 20:35:31 2013
New Revision: 1452494

URL: http://svn.apache.org/r1452494
Log:
ACCUMULO-1140 display actual number of tservers using precise whole numbers

Added:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java
  (with props)
Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java?rev=1452494&r1=1452493&r2=1452494&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/MasterServlet.java
Mon Mar  4 20:35:31 2013
@@ -133,9 +133,9 @@ public class MasterServlet extends Basic
       
       Table masterStatus = new Table("masterStatus", "Master Status");
       masterStatus.addSortableColumn("Master");
-      masterStatus.addSortableColumn("#&nbsp;Online<br />Tablet&nbsp;Servers",
new NumberType<Integer>((int) (slaves.size() * 0.8 + 1.0), slaves.size(),
+      masterStatus.addSortableColumn("#&nbsp;Online<br />Tablet&nbsp;Servers",
new PreciseNumberType((int) (slaves.size() * 0.8 + 1.0), slaves.size(),
           (int) (slaves.size() * 0.6 + 1.0), slaves.size()), "Number of tablet servers currently
available");
-      masterStatus.addSortableColumn("#&nbsp;Total<br />Tablet&nbsp;Servers",
new NumberType<Integer>(), "The total number of tablet servers configured");
+      masterStatus.addSortableColumn("#&nbsp;Total<br />Tablet&nbsp;Servers",
new PreciseNumberType(), "The total number of tablet servers configured");
       masterStatus.addSortableColumn("Last&nbsp;GC", null, "The last time files were
cleaned-up from HDFS.");
       masterStatus.addSortableColumn("#&nbsp;Tablets", new NumberType<Integer>(0,
Integer.MAX_VALUE, 2, Integer.MAX_VALUE), null);
       masterStatus.addSortableColumn("#&nbsp;Unassigned<br />Tablets", new NumberType<Integer>(0,
0), null);

Added: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java?rev=1452494&view=auto
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java
(added)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java
Mon Mar  4 20:35:31 2013
@@ -0,0 +1,17 @@
+package org.apache.accumulo.server.monitor.servlets;
+
+import org.apache.accumulo.server.monitor.util.celltypes.NumberType;
+
+public class PreciseNumberType extends NumberType<Integer> {
+  
+  public PreciseNumberType(int warnMin, int warnMax, int errMin, int errMax) {
+    super(warnMin, warnMax, errMin, errMax);
+  }
+
+  public PreciseNumberType() {
+  }
+
+  public static String bigNumber(long big, String[] SUFFIXES, long base) {
+    return String.format("%,d", big);
+  }
+}

Propchange: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/monitor/servlets/PreciseNumberType.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message