awslabs / kinesis-kafka-connector

kinesis-kafka-connector is connector based on Kafka Connect to publish messages to Amazon Kinesis streams or Amazon Kinesis Firehose.
Apache License 2.0
153 stars 91 forks source link

Fix java.lang.ClassCastException thrown when pausing/resuming consumption #31

Closed cjbackman closed 1 year ago

cjbackman commented 5 years ago

Fixes issue #34

When the type of the list elements is not specified explicitly, .toArray() fails to cast the objects into org.apache.kafka.common.PartitionTopic and thus, throws

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.kafka.common.TopicPartition;
cjbackman commented 5 years ago

Thanks, @bdesert . Issue created #34 .

bdesert commented 2 years ago

@skidder , can you confirm it works on top of the current version? did you change anything from this version? you cherry picked, the question if we can merge this PR as is. please let me know if/when you get a chance

skidder commented 2 years ago

@bdesert I cherry-picked this commit and merged it into our fork (https://github.com/muxinc/kinesis-kafka-connector/commit/12c934a1a3b29027fbb36190569e944509cc739c), along with some security updates (https://github.com/muxinc/kinesis-kafka-connector/commit/d63be4343bcb4241f2fa9891218b6dceea939d6d and https://github.com/muxinc/kinesis-kafka-connector/commit/d31c9ffcb2801ed354c8cec3ec2e51bf9e9f73b5) to AWS library dependencies, and can confirm it's working.

guyibm commented 1 year ago

@skidder @bdesert Is the plan still to merge this change from your forked branch into the awslabs one? I noticed we hit the same issue in one of our deployments that ingests a large amount of data.