@Override public Deferred<RowResultIterator> call(Exception e) throws Exception { invalidate(); if (e instanceof NonCoveredRangeException) { NonCoveredRangeException ncre = (NonCoveredRangeException) e; pruner.removePartitionKeyRange(ncre.getNonCoveredRangeEnd()); // Stop scanning if the non-covered range is past the end partition key. if (!pruner.hasMorePartitionKeyRanges()) { hasMore = false; closed = true; // the scanner is closed on the other side at this point return Deferred.fromResult(RowResultIterator.empty()); } scannerId = null; sequenceId = 0; return nextRows(); } else { LOG.debug("Can not open scanner", e); // Don't let the scanner think it's opened on this tablet. return Deferred.fromError(e); // Let the error propogate. } }