accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1438669 - /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Date Fri, 25 Jan 2013 19:52:04 GMT
Author: ecn
Date: Fri Jan 25 19:52:04 2013
New Revision: 1438669

URL: http://svn.apache.org/viewvc?rev=1438669&view=rev
Log:
ACCUMUL-909 found some other NPE opportunities

Modified:
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1438669&r1=1438668&r2=1438669&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Fri Jan 25 19:52:04 2013
@@ -897,12 +897,13 @@ public class TabletServer extends Abstra
         String oldThreadName = Thread.currentThread().getName();
 
         try {
-          runState.set(ScanRunState.RUNNING);
+          if (isCancelled() || scanSession == null)
+            return;
+          
           Thread.currentThread().setName(
               "User: " + scanSession.user + " Start: " + scanSession.startTime + " Client:
" + scanSession.client + " Tablet: " + scanSession.extent);
 
-          if (isCancelled() || scanSession == null)
-            return;
+          runState.set(ScanRunState.RUNNING);
           
           Tablet tablet = onlineTablets.get(scanSession.extent);
           
@@ -932,7 +933,7 @@ public class TabletServer extends Abstra
         } catch (TooManyFilesException tmfe) {
           addResult(tmfe);
         } catch (Throwable e) {
-          log.warn("exception while scanning tablet " + scanSession.extent, e);
+          log.warn("exception while scanning tablet " + (scanSession == null ? "(unknown)"
: scanSession.extent), e);
           addResult(e);
         } finally {
           runState.set(ScanRunState.FINISHED);



Mime
View raw message