accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1336823 - in /accumulo/trunk: ./ core/ server/ server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java src/
Date Thu, 10 May 2012 18:21:44 GMT
Author: vines
Date: Thu May 10 18:21:44 2012
New Revision: 1336823

URL: http://svn.apache.org/viewvc?rev=1336823&view=rev
Log:
Merging ACCUMULO-510 to trunk


Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
    accumulo/trunk/src/   (props changed)

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1336687-1336820
  Merged /accumulo/branches/1.4:r1336687-1336820

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/core:r1336687-1336820
  Merged /accumulo/branches/1.4/src/core:r1336687-1336820

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/server:r1336687-1336820
  Merged /accumulo/branches/1.4/src/server:r1336687-1336820

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1336823&r1=1336822&r2=1336823&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Thu May 10 18:21:44 2012
@@ -896,9 +896,13 @@ public class TabletServer extends Abstra
       public void run() {
         
         ScanSession scanSession = (ScanSession) sessionManager.getSession(scanID);
-        
+        String oldThreadName = Thread.currentThread().getName();
+
         try {
           runState.set(ScanRunState.RUNNING);
+          Thread.currentThread().setName(
+              "User: " + scanSession.user + " Start: " + scanSession.startTime + " Client:
" + scanSession.client + " Tablet: " + scanSession.extent);
+
           if (isCancelled() || scanSession == null)
             return;
           
@@ -934,6 +938,7 @@ public class TabletServer extends Abstra
           addResult(e);
         } finally {
           runState.set(ScanRunState.FINISHED);
+          Thread.currentThread().setName(oldThreadName);
         }
         
       }
@@ -950,12 +955,14 @@ public class TabletServer extends Abstra
       @Override
       public void run() {
         MultiScanSession session = (MultiScanSession) sessionManager.getSession(scanID);
+        String oldThreadName = Thread.currentThread().getName();
         
         try {
           runState.set(ScanRunState.RUNNING);
+          Thread.currentThread().setName("Client: " + session.client + " User: " + session.user
+ " Start: " + session.startTime + " Table: ");
           if (isCancelled() || session == null)
             return;
-          
+
           long maxResultsSize = acuConf.getMemoryInBytes(Property.TABLE_SCAN_MAXMEM);
           long bytesAdded = 0;
           long maxScanTime = 4000;
@@ -971,8 +978,7 @@ public class TabletServer extends Abstra
           
           Iterator<Entry<KeyExtent,List<Range>>> iter = session.queries.entrySet().iterator();
           
-          // check the time so that the read ahead thread is not
-          // monopolized
+          // check the time so that the read ahead thread is not monopolized
           while (iter.hasNext() && bytesAdded < maxResultsSize && (System.currentTimeMillis()
- startTime) < maxScanTime) {
             Entry<KeyExtent,List<Range>> entry = iter.next();
             
@@ -984,6 +990,8 @@ public class TabletServer extends Abstra
               failures.put(entry.getKey(), entry.getValue());
               continue;
             }
+            Thread.currentThread().setName(
+                "Client: " + session.client + " User: " + session.user + " Start: " + session.startTime
+ " Tablet: " + entry.getKey().toString());
             
             LookupResult lookupResult;
             try {
@@ -1051,6 +1059,7 @@ public class TabletServer extends Abstra
           log.warn("exception while doing multi-scan ", e);
           addResult(e);
         } finally {
+          Thread.currentThread().setName(oldThreadName);
           runState.set(ScanRunState.FINISHED);
         }
       }

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1336687-1336820
  Merged /accumulo/branches/1.4/src/src:r1336687-1336820



Mime
View raw message