MultiFileHdfsReader { public void reconnect() { reconnect(getCurOffset()); } MultiFileHdfsReader(HdfsReaderFactory.ReaderType readerType, SystemStreamPartition systemStreamPartition,
    List<String> partitionDescriptors, String offset);  MultiFileHdfsReader(HdfsReaderFactory.ReaderType readerType, SystemStreamPartition systemStreamPartition,
    List<String> partitionDescriptors, String offset, int numMaxRetries); static int getCurFileIndex(String offset); static String getCurSingleFileOffset(String offset); static String generateOffset(int fileIndex, String singleFileOffset); boolean hasNext(); IncomingMessageEnvelope readNext(); void reconnect(); void reconnect(String offset); void close(); SystemStreamPartition getSystemStreamPartition();  }
@Test public void testReconnect() { SystemStreamPartition ssp = new SystemStreamPartition("hdfs", "testStream", new Partition(0)); MultiFileHdfsReader multiReader = new MultiFileHdfsReader(HdfsReaderFactory.ReaderType.AVRO, ssp, Arrays.asList(descriptors), "0:0"); for (int i = 0; i < NUM_EVENTS / 2; i++) { multiReader.readNext(); } IncomingMessageEnvelope envelope = multiReader.readNext(); multiReader.reconnect(); IncomingMessageEnvelope envelopeAfterReconnect = multiReader.readNext(); Assert.assertEquals(envelope, envelopeAfterReconnect); multiReader.close(); }