You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/02/04 00:05:28 UTC

[GitHub] tweise commented on a change in pull request #7601: [FLINK-11164] Check for sentinel values when creating new Kinesis ShardIterator

tweise commented on a change in pull request #7601: [FLINK-11164] Check for sentinel values when creating new Kinesis ShardIterator
URL: https://github.com/apache/flink/pull/7601#discussion_r253326721
 
 

 ##########
 File path: flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java
 ##########
 @@ -139,69 +140,96 @@ public ShardConsumer(KinesisDataFetcher<T> fetcherRef,
 	}
 
 	/**
-	 * Find the initial shard iterator to start getting records from.
+	 * Returns a shard iterator for the given {@link SequenceNumber}.
+	 *
 	 * @return shard iterator
 	 * @throws Exception
 	 */
-	protected String getInitialShardIterator() throws Exception {
-		String nextShardItr;
+	protected String getShardIterator(SequenceNumber sequenceNumber) throws Exception {
+
+		if (isSentinelSequenceNumber(sequenceNumber)) {
+			return getShardIteratorForSentinel(sequenceNumber);
+		} else {
+			// we will be starting from an actual sequence number (due to restore from failure).
+
 
 Review comment:
   nit: drop blank line

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services