@Test(timeout = 5000, expected = IOException.class) public void testErrorWhenReadingData() throws Exception { final InputReader inputReader = generateInputReader(generateCompletableFuture(new FailedIterator())); final ParentTaskDataFetcher fetcher = createFetcher(inputReader); fetcher.fetchDataElement(); }
@Override Object fetchDataElement() throws IOException { try { if (firstFetch) { fetchDataLazily(); advanceIterator(); firstFetch = false; } while (true) { if (this.currentIterator.hasNext()) { return this.currentIterator.next(); } if (currentIteratorIndex < expectedNumOfIterators) { countBytes(currentIterator); advanceIterator(); continue; } else { break; } } } catch (final Throwable e) { throw new IOException(e); } return Finishmark.getInstance(); }
ParentTaskDataFetcher extends DataFetcher { @Override Object fetchDataElement() throws IOException { try { if (firstFetch) { fetchDataLazily(); advanceIterator(); firstFetch = false; } while (true) { if (this.currentIterator.hasNext()) { return this.currentIterator.next(); } if (currentIteratorIndex < expectedNumOfIterators) { countBytes(currentIterator); advanceIterator(); continue; } else { break; } } } catch (final Throwable e) { throw new IOException(e); } return Finishmark.getInstance(); } }
ParentTaskDataFetcher extends DataFetcher { @Override Object fetchDataElement() throws IOException { try { if (firstFetch) { fetchDataLazily(); advanceIterator(); firstFetch = false; } while (true) { if (this.currentIterator.hasNext()) { return this.currentIterator.next(); } if (currentIteratorIndex < expectedNumOfIterators) { countBytes(currentIterator); advanceIterator(); continue; } else { break; } } } catch (final Throwable e) { throw new IOException(e); } return Finishmark.getInstance(); } ParentTaskDataFetcher(final IRVertex dataSource,
                        final InputReader inputReader,
                        final OutputCollector outputCollector); }
ParentTaskDataFetcher extends DataFetcher { @Override Object fetchDataElement() throws IOException { try { if (firstFetch) { fetchDataLazily(); advanceIterator(); firstFetch = false; } while (true) { if (this.currentIterator.hasNext()) { return this.currentIterator.next(); } if (currentIteratorIndex < expectedNumOfIterators) { countBytes(currentIterator); advanceIterator(); continue; } else { break; } } } catch (final Throwable e) { throw new IOException(e); } return Finishmark.getInstance(); } ParentTaskDataFetcher(final IRVertex dataSource,
                        final InputReader inputReader,
                        final OutputCollector outputCollector); @Override void close(); }
ParentTaskDataFetcher extends DataFetcher { @Override Object fetchDataElement() throws IOException { try { if (firstFetch) { fetchDataLazily(); advanceIterator(); firstFetch = false; } while (true) { if (this.currentIterator.hasNext()) { return this.currentIterator.next(); } if (currentIteratorIndex < expectedNumOfIterators) { countBytes(currentIterator); advanceIterator(); continue; } else { break; } } } catch (final Throwable e) { throw new IOException(e); } return Finishmark.getInstance(); } ParentTaskDataFetcher(final IRVertex dataSource,
                        final InputReader inputReader,
                        final OutputCollector outputCollector); @Override void close();  }