Add logging around shard end codepaths (#585)

* Add logging around shard end codepaths

* Update logging messaging
This commit is contained in:
Micah Jaffe 2019-08-09 14:05:08 -07:00 committed by GitHub
parent 2ca3cbd21c
commit 41f996b833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,7 @@ class KinesisDataFetcher {
return TERMINAL_RESULT;
}
} else {
LOG.info("Skipping fetching records from Kinesis for shard " + shardId + ": nextIterator is null.");
return TERMINAL_RESULT;
}
}
@ -117,6 +118,7 @@ class KinesisDataFetcher {
lastKnownSequenceNumber = Iterables.getLast(result.getRecords()).getSequenceNumber();
}
if (nextIterator == null) {
LOG.info("Reached shard end: nextIterator is null in AdvancingResult.accept for shard " + shardId);
isShardEndReached = true;
}
return getResult();
@ -167,6 +169,7 @@ class KinesisDataFetcher {
nextIterator = getIterator(ShardIteratorType.AT_SEQUENCE_NUMBER.toString(), sequenceNumber);
}
if (nextIterator == null) {
LOG.info("Reached shard end: cannot advance iterator for shard " + shardId);
isShardEndReached = true;
}
this.lastKnownSequenceNumber = sequenceNumber;