accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1407493 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Fri, 09 Nov 2012 15:28:49 GMT
Author: ecn
Date: Fri Nov  9 15:28:49 2012
New Revision: 1407493

URL: http://svn.apache.org/viewvc?rev=1407493&view=rev
Log:
ACCUMULO-834 change thread name to improve debugging of slow status scans

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1407493&r1=1407492&r2=1407493&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java Fri
Nov  9 15:28:49 2012
@@ -2048,9 +2048,16 @@ public class Master implements LiveTServ
     Set<TServerInstance> currentServers = tserverSet.getCurrentServers();
     for (TServerInstance server : currentServers) {
       try {
-        TabletServerStatus status = tserverSet.getConnection(server).getTableMap();
-        result.put(server, status);
-        // TODO maybe remove from bad servers
+        Thread t = Thread.currentThread();
+        String oldName = t.getName();
+        try {
+          t.setName("Getting status from " + server);
+          TabletServerStatus status = tserverSet.getConnection(server).getTableMap();
+          // TODO maybe remove from bad servers
+          result.put(server, status);
+        } finally {
+          t.setName(oldName);
+        }
       } catch (Exception ex) {
         log.error("unable to get tablet server status " + server + " " + ex.toString());
         log.debug("unable to get tablet server status " + server, ex);



Mime
View raw message