Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/2916#discussion_r90607632
--- Diff:
flink-streaming-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/proxy/KinesisProxy.java
---
@@ -229,14 +232,33 @@ public GetShardListResult getShardList(Map<String,
String> streamNamesWithLastSe
* {@inheritDoc}
*/
@Override
- public String getShardIterator(KinesisStreamShard shard, String
shardIteratorType, @Nullable String startingSeqNum) throws InterruptedException
{
+ public String getShardIterator(KinesisStreamShard shard, String
shardIteratorType, @Nullable Object startingMarker) throws InterruptedException
{
+ GetShardIteratorRequest getShardIteratorRequest = new
GetShardIteratorRequest()
+ .withStreamName(shard.getStreamName())
+ .withShardId(shard.getShard().getShardId())
+ .withShardIteratorType(shardIteratorType);
+
+ switch (ShardIteratorType.fromValue(shardIteratorType)) {
+ case TRIM_HORIZON:
+ case LATEST:
+ break;
+ case AT_TIMESTAMP:
+ getShardIteratorRequest.setTimestamp((Date)
startingMarker);
--- End diff --
For the new implementation of this method, we probably should handle type
casting exceptions, and wrap them as `IllegalArgumentException`s. Since we're
doing the property config validating locally, this really shouldn't happen, but
it would be good to add handling type cast errors here to make this class
self-contained.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---