Skip to content

Conversation

RyanSkraba
Copy link
Contributor

What is the purpose of the change

Brief change log

Verifying this change

Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing

This change added tests and can be verified as follows:

  • Adds end-to-end test using the Pub/Sub emulator.

(example:)

  • Added integration tests for end-to-end deployment with large payloads (100MB)
  • Extended integration test for recovery after master (JobManager) failure
  • Added test that validates that TaskInfo is transferred only once across recoveries
  • Manually verified the change by running a 4 node cluser with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs / JavaDocs

jkbe and others added 5 commits February 17, 2022 13:32
* WIP

* WIP

* Working WIP

* Clean up

* Place new Pub/Sub source into existing Pub/Sub connector module

* Clean up

* Apply Spotless code formatting

[FLINK-20625][pubsub,e2e] Attempt to support stopping the reader when stopmark is encountered

[FLINK-20625][pubsub,e2e] Add checkpointing and do some refactorings

* Simplify fetching from Pub/Sub in SplitReader

* Allow Pub/Sub source to be only continuous unbounded

* Add basic PubSubSource builder

* Add configuration options for SubscriberFactory to PubSubSource, remove unused collector

* Add checkpointing

[FLINK-20625][pubsub,e2e] Allow multiple records inside single Pub/Sub message for deserialization

[FLINK-20625][pubsub,e2e] Add Javadocs, README and clean up

[FLINK-20625][pubsub,e2e] Reduce visibility of classes and their members

[FLINK-20625][pubsub,e2e] Propagate Pub/Sub subscriber creation errors from SplitReader

[FLINK-20625][pubsub,e2e] Use constants for default Pub/Sub subscriber parameters

[FLINK-20625][pubsub,e2e] Fix dynamic Scala version in artifact example

[FLINK-20625][pubsub,e2e] Rename PubSubEnumeratorCheckpoint -> PubSubEnumeratorState

[FLINK-20625][pubsub,e2e] Add version checks for deserialization

[FLINK-20625][pubsub,e2e] Remove unnecessary declaration of exception-throwing

[FLINK-20625][pubsub,e2e] Remove disfunctional end-of-stream logic

[FLINK-20625][pubsub,e2e] Avoid concurrency issues with list of Pub/Sub messages to acknowledge

[FLINK-20625][pubsub,e2e] Refactor PubSubSourceBuilder

[FLINK-20625][pubsub,e2e] Clarify consistency guarantee description

[FLINK-20625][pubsub,e2e] Clarify Pub/Sub request timeout

[FLINK-20625][pubsub,e2e] Restructure and extend readme, add basic architecture info to docstring

[FLINK-20625][pubsub,e2e] Attempt to solve concurrency issues with checkpointing
@flinkbot
Copy link
Collaborator

flinkbot commented Feb 17, 2022

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 4b8aeb8 (Thu Feb 17 14:10:03 UTC 2022)

Warnings:

  • 1 pom.xml files were touched: Check for build and licensing issues.
  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@MartijnVisser
Copy link
Contributor

@RyanSkraba Thanks a lot for the PR! We're working on moving out the first connectors from the Flink repo. Have you already looked into porting the GCP Sink to the Unified Sink API by any chance?

@RyanSkraba
Copy link
Contributor Author

Hello! I have been working on two specific Pub/Sub things (1) updating unit tests here and (2) the FLIP-143 unified sink API version. I'm currently on vacation 🏖️ so they've been progressing slowly (I haven't claimed the JIRA for this reason).

I've also been watching the elasticsearch migration. It's looking pretty good and meeting the goals of the externalization! When do you think other connectors should start moving?

@MartijnVisser
Copy link
Contributor

@RyanSkraba Awesome stuff. Let me know if you want me to assign the Jira to you. I'm hoping that we'll be able to start on the other connectors in the next couple of week. We've already created a couple of new repo's, if you also think you're ready for that let me know so I can get it arranged.

@dchristle
Copy link
Contributor

Hi @RyanSkraba thanks for your work on pushing this connector closer to the finish line! I'm interested in helping to test it out & get it merged. Can you outline what remaining areas need to be worked on?

@MartijnVisser
Copy link
Contributor

@RyanSkraba It would indeed be nice if we can move this now to the externalized repo. @dchristle it would be great if you can help validate it so we can move it forward.

@RyanSkraba
Copy link
Contributor Author

@MartijnVisser I've moved this to apache/flink-connector-gcp-pubsub#2! Thanks for the ping! @dchristle having some eyes check it out for validation would be the most useful next step.

@RyanSkraba RyanSkraba closed this Jan 26, 2023
@RyanSkraba RyanSkraba deleted the rskraba/FLINK-20625-pubsub-refactor branch January 26, 2023 01:59
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.

6 participants