incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1294864 - in /incubator/accumulo/branches/1.4/src/server/src/main: java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java java/org/apache/accumulo/server/monitor/servlets/VisServlet.java resources/web/vis.xml
Date Tue, 28 Feb 2012 22:27:16 GMT
Author: billie
Date: Tue Feb 28 22:27:15 2012
New Revision: 1294864

URL: http://svn.apache.org/viewvc?rev=1294864&view=rev
Log:
ACCUMULO-431 adjusted background grid and speed calculation, added another size

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
    incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java?rev=1294864&r1=1294863&r2=1294864&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
Tue Feb 28 22:27:15 2012
@@ -161,6 +161,7 @@ abstract public class BasicServlet exten
     sb.append("<a href='/master'>Master&nbsp;Server</a><br />\n");
     sb.append("<a href='/tservers'>Tablet&nbsp;Servers</a><br />\n");
     sb.append("<a href='/loggers'>Logger&nbsp;Servers</a><br />\n");
+    sb.append("<a href='/vis'>Server Activity</a><br />\n");
     sb.append("<a href='/gc'>Garbage&nbsp;Collector</a><br />\n");
     sb.append("<a href='/tables'>Tables</a><br />\n");
     sb.append("<a href='/trace/summary?minutes=10'>Recent&nbsp;Traces</a><br
/>\n");
@@ -172,7 +173,6 @@ abstract public class BasicServlet exten
     if (numProblems > 0)
       sb.append("<span class='error'><a href='/problems'>Table&nbsp;Problems&nbsp;<span
class='smalltext'>(" + numProblems + ")</a></span></span><br />\n");
     sb.append("<hr />\n");
-    sb.append("<a href='/vis'>Visualization</a><br />\n");
     sb.append("<a href='/xml'>XML</a><hr />\n");
     sb.append("<div class='smalltext'>[<a href='").append("/op?action=refresh&value=").append(refresh
< 1 ? "5" : "-1");
     sb.append("&redir=").append(currentPage(req)).append("'>");

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java?rev=1294864&r1=1294863&r2=1294864&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
Tue Feb 28 22:27:15 2012
@@ -36,7 +36,7 @@ public class VisServlet extends BasicSer
   
   @Override
   protected String getTitle(HttpServletRequest req) {
-    return "Tablet Server Status Visualization";
+    return "Server Activity";
   }
   
   @Override
@@ -64,6 +64,8 @@ public class VisServlet extends BasicSer
         spacing = 10;
       else if (size.equals("40"))
         spacing = 40;
+      else if (size.equals("80"))
+        spacing = 80;
     }
     
     ArrayList<TabletServerStatus> tservers = new ArrayList<TabletServerStatus>();
@@ -88,7 +90,8 @@ public class VisServlet extends BasicSer
     // size select box
     sb.append("&nbsp;&nbsp<span class='viscontrol'>Size: <select id='size'
onchange='setSize(this)'><option").append(spacing == 10 ? " selected='true'" : "")
         .append(">10</option><option").append(spacing == 20 ? " selected='true'"
: "").append(">20</option><option")
-        .append(spacing == 40 ? " selected='true'" : "").append(">40</option></select></span>\n");
+        .append(spacing == 40 ? " selected='true'" : "").append(">40</option><option").append(spacing
== 80 ? " selected='true'" : "")
+        .append(">80</option></select></span>\n");
     // motion select box
     sb.append("&nbsp;&nbsp<span class='viscontrol'>Motion: <select id='motion'
onchange='setMotion(this)'><option>Ingest</option><option")
         .append(!useIngest ? " selected='true'" : "").append(">Query</option></select></span>\n");

Modified: incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml?rev=1294864&r1=1294863&r2=1294864&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml (original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml Tue Feb 28 22:27:15
2012
@@ -16,12 +16,12 @@
 -->
 
 <script type='text/javascript'>
-var maxLoad = 3*numCores;
-var maxThroughput = 7; // exponent of 10
+var maxLoad = numCores;
+var maxThroughput = 19; // exponent of 2
 
 // size and spacing variables
 var numDots = 0; // number of dots to draw
-var dotSpacing = 10; // spacing between centers of dots
+var dotSpacing = 10; // spacing between centers of dots (radius)
 var dotPadding = 0.5; // dot padding
 var minDotRadius = 3; // min dot radius
 var maxDotRadius = dotSpacing - dotPadding;
@@ -87,6 +87,7 @@ function handleNewData() {
   var ingestinfo = xmlhttp.responseXML.getElementsByTagName('ingest');
   var queryinfo = xmlhttp.responseXML.getElementsByTagName('query');
   var deadinfo = xmlhttp.responseXML.getElementsByTagName('deadTabletServer');
+  var badinfo = xmlhttp.responseXML.getElementsByTagName('badTabletServer');
   var idinfo = xmlhttp.responseXML.getElementsByTagName('server');
   
   for (i=0; i < loadinfo.length; i++) {
@@ -102,7 +103,10 @@ function handleNewData() {
     if (activity < 10) {
       newSkip = -1;
     } else {
-      newSkip = Math.ceil(Math.pow(1.5,maxThroughput - Math.log(activity)/Math.log(10)));
+      activity = Math.log(activity)/Math.log(2);
+      if (maxThroughput < activity)
+        maxThroughput = activity;
+      newSkip = Math.ceil(Math.pow(1.8, maxThroughput - activity));
     }
     setDotInfo(newColor,newSkip,info,extra,i);
   }
@@ -110,9 +114,12 @@ function handleNewData() {
   for (i=loadinfo.length,j=0; j < deadinfo.length; i++,j++) {
     setDotInfo(-1,-1,deadinfo[j].attributes[0].nodeValue,'',i);
   }
-  if (numDots != loadinfo.length + deadinfo.length)
+  for (i=loadinfo.length+deadinfo.length,j=0; j < badinfo.length; i++,j++) {
+    setDotInfo(-1,-1,badinfo[j].attributes[0].nodeValue,'',i);
+  }
+  if (numDots != loadinfo.length + deadinfo.length + badinfo.length)
     drawGrid();
-  numDots = loadinfo.length + deadinfo.length;
+  numDots = loadinfo.length + deadinfo.length + badinfo.length;
   xmlReturned = true;
 }
 
@@ -178,9 +185,9 @@ function drawDots(){
 // fill in a few grey dots
 function drawGrid() {
   context.clearRect(0, 0, canvas.width, canvas.height);
-  for (i=0; i < 32; i++) {
-    for (j=0; j < 32; j++) {
-      drawDot(i,j,maxDotRadius,nullColor);
+  for (i=0,k=0; i < canvas.width; i+=dotSpacing*2,k++) {
+    for (j=0,l=0; j < canvas.height; j+=dotSpacing*2,l++) {
+      drawDot(k,l,maxDotRadius,nullColor);
     }
   }
 }
@@ -271,6 +278,10 @@ function setSize(obj) {
       dotSpacing = 20;
       minDotRadius = 5;
       break;
+    case 3:
+      dotSpacing = 40;
+      minDotRadius = 7;
+      break;
     default:
       dotSpacing = 10;
       minDotRadius = 3;
@@ -329,7 +340,7 @@ function showId(e) {
 
 function setState() {
   var url = visurl+'?shape='+(useCircles?'circles':'squares')+'&size='+(dotSpacing*2)+'&motion='+(useIngest?'ingest':'query');
-  window.history.replaceState(window.history.state,'Tablet Server Status Visualization',url);
+  window.history.replaceState(window.history.state,'Server Activity',url);
 }
 
 // go to server page on click



Mime
View raw message