accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1294816 - in /incubator/accumulo/trunk: ./ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/master/ src/server/src/main/java/org/apache/accumulo/server/monitor/ src/server/src/main/java/org/apache/accumulo/server/m...
Date Tue, 28 Feb 2012 20:14:54 GMT
Author: billie
Date: Tue Feb 28 20:14:54 2012
New Revision: 1294816

URL: http://svn.apache.org/viewvc?rev=1294816&view=rev
Log:
ACCUMULO-431 ACCUMULO-329 merged to trunk

Added:
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
      - copied unchanged from r1294805, incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/VisServlet.java
    incubator/accumulo/trunk/src/server/src/main/resources/web/vis.xml
      - copied unchanged from r1294805, incubator/accumulo/branches/1.4/src/server/src/main/resources/web/vis.xml
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/server/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
    incubator/accumulo/trunk/src/server/src/main/resources/web/screen.css

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 20:14:54 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043,1236873,1245632
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1294783
+/incubator/accumulo/branches/1.4:1201902-1294805

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 20:14:54 2012
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3.5rc/src/core:1209938
 /incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215
-/incubator/accumulo/branches/1.4/src/core:1201902-1294781
+/incubator/accumulo/branches/1.3.5rc/src/core:1209938
+/incubator/accumulo/branches/1.4/src/core:1201902-1294805

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 28 20:14:54 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
 /incubator/accumulo/branches/1.3.5rc/src/server:1209938
-/incubator/accumulo/branches/1.4/src/server:1201902-1294783
+/incubator/accumulo/branches/1.4/src/server:1201902-1294805

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1294816&r1=1294815&r2=1294816&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Tue Feb 28 20:14:54 2012
@@ -1359,13 +1359,22 @@ public class Master implements LiveTServ
                   break;
                 case ASSIGNED_TO_DEAD_SERVER:
                   assignedToDeadServers.add(tls);
-                  log.info("Current servers " + currentTServers.keySet());
+                  if (server.equals(migrations.get(tls.extent)))
+                    migrations.remove(tls.extent);
+                  // log.info("Current servers " + currentTServers.keySet());
                   break;
                 case UNASSIGNED:
                   // maybe it's a finishing migration
                   TServerInstance dest = migrations.get(tls.extent);
-                  if (dest != null && destinations.keySet().contains(dest)) {
-                    assignments.add(new Assignment(tls.extent, dest));
+                  if (dest != null) {
+                    // if destination is still good, assign it
+                    if (destinations.keySet().contains(dest)) {
+                      assignments.add(new Assignment(tls.extent, dest));
+                    } else {
+                      // get rid of this migration
+                      migrations.remove(tls.extent);
+                      unassigned.put(tls.extent, server);
+                    }
                   } else {
                     unassigned.put(tls.extent, server);
                   }
@@ -1381,7 +1390,7 @@ public class Master implements LiveTServ
                   break;
                 case ASSIGNED_TO_DEAD_SERVER:
                   assignedToDeadServers.add(tls);
-                  log.info("Current servers " + currentTServers.keySet());
+                  // log.info("Current servers " + currentTServers.keySet());
                   break;
                 case HOSTED:
                   TServerConnection conn = tserverSet.getConnection(server);
@@ -1806,15 +1815,7 @@ public class Master implements LiveTServ
           found.add(extent);
         }
       }
-      Set<KeyExtent> notFound = new HashSet<KeyExtent>();
-      synchronized (migrations) {
-        notFound.addAll(migrations.keySet());
-      }
-      notFound.removeAll(found);
-      for (KeyExtent extent : notFound) {
-        log.info("Canceling migration of " + extent + " to " + migrations.get(extent) + ":
tablet no longer exists (probably due to a split)");
-        migrations.remove(extent);
-      }
+      migrations.keySet().retainAll(found);
     }
   }
   

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java?rev=1294816&r1=1294815&r2=1294816&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/Monitor.java
Tue Feb 28 20:14:54 2012
@@ -43,9 +43,9 @@ import org.apache.accumulo.core.util.Dae
 import org.apache.accumulo.core.util.LoggingRunnable;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.ServerServices;
+import org.apache.accumulo.core.util.ServerServices.Service;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.core.util.ServerServices.Service;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.client.HdfsZooInstance;
@@ -59,6 +59,7 @@ import org.apache.accumulo.server.monito
 import org.apache.accumulo.server.monitor.servlets.ProblemServlet;
 import org.apache.accumulo.server.monitor.servlets.TServersServlet;
 import org.apache.accumulo.server.monitor.servlets.TablesServlet;
+import org.apache.accumulo.server.monitor.servlets.VisServlet;
 import org.apache.accumulo.server.monitor.servlets.XMLServlet;
 import org.apache.accumulo.server.monitor.servlets.trace.ListType;
 import org.apache.accumulo.server.monitor.servlets.trace.ShowTrace;
@@ -448,6 +449,7 @@ public class Monitor {
     server.addServlet(GcStatusServlet.class, "/gc");
     server.addServlet(LogServlet.class, "/log");
     server.addServlet(XMLServlet.class, "/xml");
+    server.addServlet(VisServlet.class, "/vis");
     server.addServlet(Summary.class, "/trace/summary");
     server.addServlet(ListType.class, "/trace/listType");
     server.addServlet(ShowTrace.class, "/trace/show");

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java?rev=1294816&r1=1294815&r2=1294816&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/BasicServlet.java
Tue Feb 28 20:14:54 2012
@@ -121,7 +121,7 @@ abstract public class BasicServlet exten
     // BEGIN HEADER
     sb.append("<head>\n");
     sb.append("<title>").append(getTitle(req)).append(" - Accumulo ").append(Constants.VERSION).append("</title>\n");
-    if ((refresh > 0) && (req.getRequestURI().startsWith("/docs") == false))
+    if ((refresh > 0) && (req.getRequestURI().startsWith("/docs") == false) &&
(req.getRequestURI().startsWith("/vis") == false))
       sb.append("<meta http-equiv='refresh' content='" + refresh + "' />\n");
     sb.append("<meta http-equiv='Content-Type' content='").append(DEFAULT_CONTENT_TYPE).append("'
/>\n");
     sb.append("<meta http-equiv='Content-Script-Type' content='text/javascript' />\n");
@@ -172,6 +172,7 @@ 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/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java?rev=1294816&r1=1294815&r2=1294816&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/XMLServlet.java
Tue Feb 28 20:14:54 2012
@@ -44,7 +44,7 @@ public class XMLServlet extends BasicSer
   
   @Override
   protected void pageStart(HttpServletRequest req, HttpServletResponse resp, StringBuilder
sb) {
-    resp.setContentType("text/xml");
+    resp.setContentType("text/xml;charset=UTF-8");
     sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
     sb.append("<stats>\n");
   }
@@ -67,6 +67,7 @@ public class XMLServlet extends BasicSer
       
       sb.append("\n<server id='").append(status.name).append("'>\n");
       sb.append("<lastContact>").append(System.currentTimeMillis() - status.lastContact).append("</lastContact>\n");
+      sb.append("<osload>").append(status.osLoad).append("</osload>\n");
       
       TableInfo summary = Monitor.summarizeTableStats(status);
       sb.append("<compactions>\n");
@@ -84,6 +85,8 @@ public class XMLServlet extends BasicSer
         sb.append("</loggers>");
       }
       
+      sb.append("<ingest>").append(summary.ingestRate).append("</ingest>\n");
+      sb.append("<query>").append(summary.queryRate).append("</query>\n");
       totalIngest += summary.ingestRate;
       totalQuery += summary.queryRate;
       totalEntries += summary.recs;

Modified: incubator/accumulo/trunk/src/server/src/main/resources/web/screen.css
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/resources/web/screen.css?rev=1294816&r1=1294815&r2=1294816&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/resources/web/screen.css (original)
+++ incubator/accumulo/trunk/src/server/src/main/resources/web/screen.css Tue Feb 28 20:14:54
2012
@@ -313,3 +313,18 @@ pre.logevent {
     text-align: center;
     font-size: 1.5em;
 }
+.nowrap {
+    white-space:nowrap;
+}
+
+.viscontrol {
+    border: 1px solid #c4c4c4;
+    padding: 5px;
+}
+
+#vishoverinfo {
+    visibility: hidden;
+    position: absolute;
+    border: 1px solid #c4c4c4;
+    background-color: #ffffff;
+}



Mime
View raw message