accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Don Resnik <>
Subject Re: 'scanner closed' error
Date Mon, 04 Aug 2014 13:45:26 GMT

Thanks for the info.  After looking at it today, I am more inclined to
think that the iterator is actually working properly and I an just getting
the 500-Scanner Closed error at the end of the scan due to the ticket that
Josh noted.

So, given that, I have two questions:

1.  Is it ok to just code around the error handling for this particular
error? Currently we call this logic via REST web service and we loop
thorough the HTTP-200 responses until we get a HTTP-204.  If we get any
HTTP-400+ responses we close the query and throw an exception.  If I add an
additional conditional before the HTTP-400+ check to check for HTTP-500 and
errorMessage.indexOf("scanner closed") then just break out of the loop and
continue processing, but do not throw an error, would that work?

2.  Could this issue come from using a BatchScanner with a single range?
The query is not sure if it is going to get 1 or more ranges, so we use a
BatchScanner either way.  Should I alter the code to use a Scanner once I
know I only have one range?

Thanks for your insight.

Don Resnik

On Sun, Aug 3, 2014 at 9:45 PM, William Slacum <> wrote:

> I have seen issues if I don't have an explicit close on the batch scanner.
> When I don't have the close, the gc ends up calling `finalize()` which
> closes the thread pool. Basically, the work around is to manage the
> lifetime of the instance yourself, rather than leave it up to fate.
> On Sun, Aug 3, 2014 at 7:03 PM, Don Resnik <
>> wrote:
>> Josh,
>> Thanks for the response.  I did see that ticket in my initial research.
>> If I understood correctly, that ticket makes it sound like the scanner was
>> closed programmatically with threads still running, so there was not really
>> an error.  In my case, the error is coming up well before the scanner has
>> completed.  We did not intend to programmatically close the scanner where
>> is it closing on us, but I will confirm this week that we do not have a
>> condition that would cause the scanner to close prematurely with threads
>> still running.
>> Thanks,
>> Don Resnik
>> On Sun, Aug 3, 2014 at 5:05 PM, Josh Elser <> wrote:
>>> Don,
>>> Does this describe your error?
>>> On 8/3/14, 4:50 PM, Don Resnik wrote:
>>>> I have some query logic that uses a stack of custom iterators with a
>>>> batch scanner.  The query begins to return values but then stops with a
>>>> 'scanner closed' error.  The only reference I can find to scanner closed
>>>> in the src is in TabletServerBatchReaderIterator.  I can see that the
>>>> error is thrown when the query thread pool is shutdown, but I am not
>>>> sure why this is happening.  This query logic works on a single node
>>>> instance, but I get the scanner closed error when running on a
>>>> multi-node
>>>> cluster.
>>>> So far the stack traces have not been very helpful and we are not sure
>>>> where or how to troubleshoot this.  Any info on what conditions would
>>>> lead to a scanner closed error and where to begin looking to resolve
>>>> would be appreciated.
>>>> Thanks,

View raw message