## What is the purpose of the change
- Some time ago [FLINK-4197](https://issues.apache.org/jira/browse/FLINK-4197) 
added the ability to connect to a local Kinesis endpoint but also introduced 
some bugs
- Some time ago [FLINK-9402](https://issues.apache.org/jira/browse/FLINK-9402) 
added some fixes for those bugs but for FlinkKinesisConsumer only
- This PR addresses 
[FLINK-10316](https://issues.apache.org/jira/browse/FLINK-10316) to fix the 
remaining bugs to allow FlinkKinesisProducer also to connect to a local Kinesis 
endpoint

## Brief change log

  - The method `KinesisConfigUtil.validateAwsConfiguration(Properties config)` 
is used by both `FlinkKinesisConsumer` and `FlinkKinesisProducer` but 
AWS_REGION/AWS_ENDPOINT validation was performed only for Consumer who needs 
only one of them to be set. On the other side Producer requires AWS_REGION to 
be set even if AWS_ENDPOINT is defined to connect to local Kinesis. So the 
change in this PR is to change the method signature to have a boolean to 
identify if it is a Consumer or Producer so the validation can be done properly 
for each case:
`KinesisConfigUtil.validateAwsConfiguration(Properties config, boolean 
isProducer)`
  - Changed the Unit Tests accordingly 

## Jira Note
There are 2 other tickets that could be closed along with this one since they 
all refer to the same issue: 
[FLINK-9618](https://issues.apache.org/jira/browse/FLINK-9618) and 
[FLINK-8936](https://issues.apache.org/jira/browse/FLINK-8936)

## Verifying this change

This change is already covered by existing tests, such as *(please describe 
tests)*.
  - KinesisConfigUtilTest.testMissingAwsRegionInConfig
  - KinesisConfigUtilTest.testAwsRegionOrEndpointInConfig

## 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, Yarn/Mesos, ZooKeeper: (no)
  - The S3 file system connector: (no)

## Documentation

  - Does this pull request introduce a new feature? (no)
  - If yes, how is the feature documented? (not applicable)


[ Full content available at: https://github.com/apache/flink/pull/6789 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to