@Override public boolean start() throws IOException {
  LOG.info("Starting reader using {}",initialCheckpointGenerator);
  try {
    KinesisReaderCheckpoint initialCheckpoint=initialCheckpointGenerator.generate(kinesis);
    List<ShardRecordsIterator> iterators=newArrayList();
    for (    ShardCheckpoint checkpoint : initialCheckpoint) {
      iterators.add(checkpoint.getShardRecordsIterator(kinesis));
    }
    shardIterators=new RoundRobin<>(iterators);
  }
 catch (  TransientKinesisException e) {
    throw new IOException(e);
  }
  return advance();
}

@ Override public boolean start ( ) throws IOException { LOG . info ( "Starting reader using {}" , initialCheckpointGenerator ) ; try { KinesisReaderCheckpoint initialCheckpoint = initialCheckpointGenerator . generate ( kinesis ) ; List < ShardRecordsIterator > iterators = newArrayList ( ) ; for ( ShardCheckpoint checkpoint : initialCheckpoint ) { iterators . add ( checkpoint . getShardRecordsIterator ( kinesis ) ) ; } shardIterators = new RoundRobin < > ( iterators ) ; } catch ( TransientKinesisException e ) { throw new IOException ( e ) ; } return advance ( ) ; }
generates initial checkpoint and instantiates iterators for shards .
