New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-30056][connectors][kafka] Replace deprecated kafka-clients methods #21150
Conversation
@flinkbot run azure |
123bdae
to
2587493
Compare
@flinkbot run azure |
6 similar comments
@flinkbot run azure |
@flinkbot run azure |
@flinkbot run azure |
@flinkbot run azure |
@flinkbot run azure |
@flinkbot run azure |
2587493
to
4c3b6c7
Compare
@flinkbot run azure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I
records = consumer.poll(pollTimeout); | ||
records = consumer.poll(Duration.ofMillis(pollTimeout)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: This changes the blocking behavior of this call.
I'd like to see a proper ticket for this particular change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, sure
jira issue created https://issues.apache.org/jira/browse/FLINK-30056
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please let me know if i need to change commit message or rebase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split the commits such that 1 is making the poll change, and the other (hotfix) commit with the remaining changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
22e4694
to
47d13be
Compare
This changes the blocking behavior, as the previous method essentially ignored the timeout.
47d13be
to
e9459d4
Compare
The PR is replacing deprecated methods
org.apache.kafka.clients.admin.DescribeTopicsResult#all()
org.apache.kafka.clients.consumer.KafkaConsumer#poll(long)
as it was mentioned in corresponding javadocs
What is the purpose of the change
org.apache.kafka.clients.admin.DescribeTopicsResult#all() was made deprecated at https://issues.apache.org/jira/browse/KAFKA-10774
and it is suggested to use org.apache.kafka.clients.admin.DescribeTopicsResult#allTopicNames
org.apache.kafka.clients.consumer.KafkaConsumer#poll(long) was deprecated at https://issues.apache.org/jira/browse/KAFKA-5697
and it's suggested to use org.apache.kafka.clients.consumer.KafkaConsumer#poll(java.time.Duration)
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: ( no)Documentation