dannycranmer opened a new pull request #13189:
URL: https://github.com/apache/flink/pull/13189
## What is the purpose of the change
Adding `StreamConsumerRegistrar` that is responsible for registration and
deregistration of EFO stream consumers. There are 3 strategies:
*Registration*
- `EAGER`: Registration occurs in `FlinkKinesisConsumer` constructor
- `LAZY`: Registration occurs in `KinesisDataFetcher` constructor
- `NONE`: Application passes in ARN, no registration performed
*Deregistration*
- `EAGER|LAZY`: Deregistration occurs in `KinesisDataFetcher` shutdown
- `NONE`: No deregistration performed
## Brief change log
- `StreamConsumerRegistrar`
- Added class to perform the registration and deregistration business logic
- `KinesisProxyV2`
- Updated to invoke AWS services related to stream registration:
- `describeStream`
- `describeStreamConsumer `
- `registerStreamConsumer `
- `deregisterStreamConsumer `
- `FlinkKinesisConsumer`
- Invokes `StreamConsumerRegistrarUtil#eagerlyRegisterStreamConsumers` in
constructor
- `KinesisDataFetcher`
- Invokes `StreamConsumerRegistrarUtil#lazilyRegisterStreamConsumers` in
constructor
- Invokes `StreamConsumerRegistrarUtil#deregisterStreamConsumers` in
shutdown
- `FanOutRecordPublisherConfiguration`
- Added new config for registration/deregistration timeout to prevent
registrar spinning for too long
- Added a new `RuntimeException` hierarchy for semantic errors thrown from
Kinesis connector, rooted by `FlinkKinesisException`
## Verifying this change
This change added tests and can be verified as follows:
- Running the following unit tests:
- `KinesisDataFetcherTest`
- `FanOutRecordPublisherConfigurationTest`
- `StreamConsumerRegistrarTest`
- `KinesisProxyV2Test`
- `AwsV2UtilTest`
- `KinesisConfigUtilTest`
- `StreamConsumerRegistrarUtilTest`
- Fake Kinesis behaviours modelled to emulate server:
- `FakeKinesisFanOutBehavioursFactory`
## 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)`: yes (backwards compatible change made to
`FlinkKinesisConsumer`)
- 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/Mesos, 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? There is a [follow up
task](https://issues.apache.org/jira/browse/FLINK-18870) for documentation
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]