accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [2/3] git commit: ACCUMULO-2704 print information about dead servers
Date Thu, 07 Aug 2014 18:56:58 GMT
ACCUMULO-2704 print information about dead servers


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/d34887a2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/d34887a2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/d34887a2

Branch: refs/heads/master
Commit: d34887a23c1489cd0321989cad42f50ac26e622e
Parents: 61720c7
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Thu Aug 7 14:54:00 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Thu Aug 7 14:54:14 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/test/GetMasterStats.java  | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d34887a2/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
index 5ec13f3..0ba4ab2 100644
--- a/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
+++ b/test/src/main/java/org/apache/accumulo/test/GetMasterStats.java
@@ -16,10 +16,13 @@
  */
 package org.apache.accumulo.test;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.impl.MasterClient;
+import org.apache.accumulo.core.master.thrift.DeadServer;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.master.thrift.RecoveryStatus;
@@ -58,6 +61,12 @@ public class GetMasterStats {
         out(1, "%s: %d", entry.getKey(), (int) entry.getValue());
       }
     }
+    out(0, "Dead tablet servers count: %s", stats.deadTabletServers.size());
+    for (DeadServer dead : stats.deadTabletServers) {
+      out(1, "Dead tablet server: %s", dead.server);
+      out(2, "Last report: %s", new SimpleDateFormat().format(new Date(dead.lastStatus)));
+      out(2, "Cause: %s", dead.status);
+    }
     if (stats.tableMap != null && stats.tableMap.size() > 0) {
       out(0, "Tables");
       for (Entry<String,TableInfo> entry : stats.tableMap.entrySet()) {


Mime
View raw message