Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/2225#discussion_r70308410
--- Diff:
flink-streaming-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/internals/ShardConsumer.java
---
@@ -206,7 +206,13 @@ private void
deserializeRecordForCollectionAndUpdateState(UserRecord record)
final long approxArrivalTimestamp =
record.getApproximateArrivalTimestamp().getTime();
final T value = deserializer.deserialize(
- keyBytes, dataBytes, subscribedShard.getStreamName(),
record.getSequenceNumber(), approxArrivalTimestamp);
+ keyBytes,
+ dataBytes,
+ record.getPartitionKey(),
+ record.getSequenceNumber(),
+ approxArrivalTimestamp,
+ subscribedShard.getStreamName(),
+ subscribedShard.getShard().getShardId());
--- End diff --
`subscribedShard.getStreamName()` and
`subscribedShard.getShard().getShardId()` will be the same for all records
collected in the while loop. Probably won't have a big performance difference,
but perhaps it would be better to have `final` values for these two to point
out this fact?
---
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.
---