@Test public void testRewind() throws IOException { ThriftRecordReader recordReader = new ThriftRecordReader(); recordReader.init(_tempFile, getSourceFields(), getThriftRecordReaderConfig()); List<GenericRow> genericRows = new ArrayList<>(); while (recordReader.hasNext()) { genericRows.add(recordReader.next()); } recordReader.rewind(); while (recordReader.hasNext()) { genericRows.add(recordReader.next()); } recordReader.close(); Assert.assertEquals(genericRows.size(), 4, "The number of rows return after the rewind is incorrect"); }
@Override public void rewind() throws IOException { _inputStream.close(); init(); }
ThriftRecordReader implements RecordReader { @Override public void rewind() throws IOException { _inputStream.close(); init(); } }
ThriftRecordReader implements RecordReader { @Override public void rewind() throws IOException { _inputStream.close(); init(); }  }
ThriftRecordReader implements RecordReader { @Override public void rewind() throws IOException { _inputStream.close(); init(); }  @Override void init(File dataFile, Set<String> fieldsToRead, @Nullable RecordReaderConfig config); @Override boolean hasNext(); @Override GenericRow next(); @Override GenericRow next(GenericRow reuse); @Override void rewind(); @Override void close(); }
ThriftRecordReader implements RecordReader { @Override public void rewind() throws IOException { _inputStream.close(); init(); }  @Override void init(File dataFile, Set<String> fieldsToRead, @Nullable RecordReaderConfig config); @Override boolean hasNext(); @Override GenericRow next(); @Override GenericRow next(GenericRow reuse); @Override void rewind(); @Override void close();  }