Author: kturner
Date: Tue May 29 19:37:33 2012
New Revision: 1343945
URL: http://svn.apache.org/viewvc?rev=1343945&view=rev
Log:
ACCUMULO-487 Made batch scanner iterator fail when batch scanner closed
Modified:
accumulo/trunk/ (props changed)
accumulo/trunk/core/ (props changed)
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
accumulo/trunk/server/ (props changed)
accumulo/trunk/src/ (props changed)
Propchange: accumulo/trunk/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.4/src:r1343899-1343942
Merged /accumulo/branches/1.4:r1343898-1343942
Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.4/core:r1343898-1343942
Merged /accumulo/branches/1.4/src/core:r1343899-1343942
Modified:
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
URL:
http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java?rev=1343945&r1=1343944&r2=1343945&view=diff
==============================================================================
---
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
(original)
+++
accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
Tue May 29 19:37:33 2012
@@ -178,7 +178,7 @@ public class TabletServerBatchReaderIter
// don't have one cached, try to cache one and return success
try {
- while (nextEntry == null && fatalException == null)
+ while (nextEntry == null && fatalException == null &&
!queryThreadPool.isShutdown())
nextEntry = resultsQueue.poll(1, TimeUnit.SECONDS);
if (fatalException != null)
@@ -187,6 +187,9 @@ public class TabletServerBatchReaderIter
else
throw new RuntimeException(fatalException);
+ if (queryThreadPool.isShutdown())
+ throw new RuntimeException("scanner closed");
+
return nextEntry.getKey() != null && nextEntry.getValue() != null;
} catch (InterruptedException e) {
throw new RuntimeException(e);
Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.4/server:r1343898-1343942
Merged /accumulo/branches/1.4/src/server:r1343899-1343942
Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.4/src:r1343898-1343942
Merged /accumulo/branches/1.4/src/src:r1343899-1343942