GitHub user fhueske opened a pull request:
https://github.com/apache/flink/pull/4638
[FLINK-6563] [table] Add time indicator support to KafkaTableSource.
## What is the purpose of the change
Add support for time indicators (processing time, ingestion time, event
time) for Kafka table sources that extend `KafkaTableSource`.
The PR adds the following methods:
- `addProcTimeAttribute(String proctime)`: adds a processing time attribute
to the table
- `addIngestionTimeAttribute(String ingestionTime)`: adds an ingestion time
attribute to the table
- `setAscendingRowTimeAttribute(String rowtime)`: sets an existing
attribute to be the row time attribute and automatically assigns watermarks for
monotonically increasing attributes.
- `setBoundedOutOfOrderRowtimeAttribute(String rowtime, long
watermarkDelay)`: sets an existing attribute to be the row time attribute and
automatically assigns watermarks with a specified fixed delay.
So, event-time is currently only supported for ascending timestamps and
timestamps which are out-of-order by a fixed delay.
## Brief change log
- `KafkaTableSource` implements `DefinedProcTimeAttribute` and
`DefinedRowTimeAttribute` interfaces.
- Added methods to set different time attributes.
- Added tests to validate the time attribute methods.
## Verifying this change
- added `KafkaTableSource` test.
## 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**
## Documentation
- Does this pull request introduce a new feature? **yes**
- If yes, how is the feature documented? **NOT YET**
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/fhueske/flink tableKafkaTime
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4638.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 #4638
----
commit ba6385b1f8c546221c716e44e2d8f9a9fac5a05a
Author: Fabian Hueske <[email protected]>
Date: 2017-08-31T12:35:41Z
[FLINK-6563] [table] Add time indicator support to KafkaTableSource.
----
---