@Test public void testSeek() throws Exception { Range r = EasyMock.createMock(Range.class); Collection<ByteSequence> f = new java.util.HashSet<>(); ii.seek(r, f, true); replay(ii); pri.seek(r, f, true); verify(ii); assertFalse(pri.sawError()); }
@Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (continueOnError && sawError) { return; } try { source.seek(range, columnFamilies, inclusive); } catch (IOException ioe) { sawError = true; ProblemReports.getInstance(context) .report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); if (!continueOnError) { throw ioe; } } }
ProblemReportingIterator implements InterruptibleIterator { @Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (continueOnError && sawError) { return; } try { source.seek(range, columnFamilies, inclusive); } catch (IOException ioe) { sawError = true; ProblemReports.getInstance(context) .report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); if (!continueOnError) { throw ioe; } } } }
ProblemReportingIterator implements InterruptibleIterator { @Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (continueOnError && sawError) { return; } try { source.seek(range, columnFamilies, inclusive); } catch (IOException ioe) { sawError = true; ProblemReports.getInstance(context) .report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); if (!continueOnError) { throw ioe; } } } ProblemReportingIterator(ServerContext context, TableId tableId, String resource,
      boolean continueOnError, SortedKeyValueIterator<Key,Value> source); }
ProblemReportingIterator implements InterruptibleIterator { @Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (continueOnError && sawError) { return; } try { source.seek(range, columnFamilies, inclusive); } catch (IOException ioe) { sawError = true; ProblemReports.getInstance(context) .report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); if (!continueOnError) { throw ioe; } } } ProblemReportingIterator(ServerContext context, TableId tableId, String resource,
      boolean continueOnError, SortedKeyValueIterator<Key,Value> source); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env); @Override Key getTopKey(); @Override Value getTopValue(); @Override boolean hasTop(); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); boolean sawError(); String getResource(); @Override void setInterruptFlag(AtomicBoolean flag); }
ProblemReportingIterator implements InterruptibleIterator { @Override public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException { if (continueOnError && sawError) { return; } try { source.seek(range, columnFamilies, inclusive); } catch (IOException ioe) { sawError = true; ProblemReports.getInstance(context) .report(new ProblemReport(tableId, ProblemType.FILE_READ, resource, ioe)); if (!continueOnError) { throw ioe; } } } ProblemReportingIterator(ServerContext context, TableId tableId, String resource,
      boolean continueOnError, SortedKeyValueIterator<Key,Value> source); @Override SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env); @Override Key getTopKey(); @Override Value getTopValue(); @Override boolean hasTop(); @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override void next(); @Override void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive); boolean sawError(); String getResource(); @Override void setInterruptFlag(AtomicBoolean flag);  }