GitHub user xccui opened a pull request:
https://github.com/apache/flink/pull/5056
[FLINK-8118] [table] Allow specifying reading offsets of KafkaTableSources
## What is the purpose of the change
This PR enables the kafka table source builder to specify start reading
offsets for the `KafkaTableSource`.
## Brief change log
- Add offset specifying methods (reading from latest, earliest, group
offsets and specified offsets) to the builder.
- Configure the offset option in a new `getKafkaConsumer` and change the
old `getKafkaConsumer` to `createKafkaConsumer`.
- Add a related test and update the documents.
## Verifying this change
The change can be verified by `KafkaTableSourceTestBase.
testKafkaTSSetConsumeOffsets`.
## 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? (yes)
- If yes, how is the feature documented? (docs)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xccui/flink FLINK-8118
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5056.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5056
----
commit 3fd22f85af170f20de4126abd5182abf29970ca8
Author: Xingcan Cui <[email protected]>
Date: 2017-11-22T16:00:39Z
[FLINK-8118][table]Allow to specify the offsets of KafkaTableSources
----
---