Skip to content
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

[#30870]: support consumer polling timeout in KafkaIO expansion service #30915

Merged
merged 12 commits into from
Apr 16, 2024

Conversation

xianhualiu
Copy link
Contributor

addresses #30870. Previous PR (#30877) made consumer polling timeout configurable for KafkaIO.Read in Java SDK. This PR contains changes to make the same configurable for Python SDK with the new configuration variable: consumerPollingTimeoutSeconds., which must be greater than 0. If not specified, the default will be 2 second.

Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm for label python.
R: @kennknowles for label java.
R: @ahmedabu98 for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

Copy link
Contributor

@jbsabbagh jbsabbagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One small comment regarding docs.

xianhualiu and others added 3 commits April 10, 2024 09:25
Co-authored-by: Jonathan Sabbagh <108473809+jbsabbagh@users.noreply.github.com>
…KafkaIO.java

Co-authored-by: Jonathan Sabbagh <108473809+jbsabbagh@users.noreply.github.com>
…KafkaIO.java

Co-authored-by: Jonathan Sabbagh <108473809+jbsabbagh@users.noreply.github.com>
Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! (and thanks @jbsabbagh for the reviews!)

Could you please fix the lint/spotless issues? Otherwise this LGTM

./gradlew :sdks:java:io:kafka:spotlessApply should fix the java spotless issues. https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-LintandFormattingChecks describes how to fix the python linting issues

@damccorm damccorm added this to the 2.56.0 Release milestone Apr 10, 2024
@damccorm
Copy link
Contributor

@xianhualiu any update here?

@xianhualiu
Copy link
Contributor Author

@damccorm please merge.

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@damccorm damccorm merged commit a44c4f1 into apache:master Apr 16, 2024
85 of 87 checks passed
@Abacn Abacn mentioned this pull request Apr 16, 2024
3 tasks
@Abacn
Copy link
Contributor

Abacn commented Apr 16, 2024

Looks like :sdks:java:io:kafka:upgrade:test still failing: https://github.com/apache/beam/actions/runs/8709671441

Also there is report of KafkaIO added option breaking upgrade compatibility: #30197 (comment)

@@ -75,6 +75,7 @@ public class KafkaIOTranslationTest {
READ_TRANSFORM_SCHEMA_MAPPING.put(
"getValueDeserializerProvider", "value_deserializer_provider");
READ_TRANSFORM_SCHEMA_MAPPING.put("getCheckStopReadingFn", "check_stop_reading_fn");
READ_TRANSFORM_SCHEMA_MAPPING.put("getConsumerPollingTimeout", "consumer_polling_timeout");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is not complete. Previously, the error was

java.lang.AssertionError: Method getConsumerPollingTimeout will not be tracked when upgrading the 'KafkaIO.Read' transform. Please update 'KafkaIOTranslation.KafkaIOReadWithMetadataTranslator' to track the new method and update this test.

adding this line, the error became

java.lang.AssertionError: Field name consumer_polling_timeout was not found in the read transform schema defined in KafkaIOReadWithMetadataTranslator.

Abacn added a commit to Abacn/beam that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants