Re: How to get kafka record's timestamp in job

2019-12-31 Thread David Anderson
> In kafka010, ConsumerRecord has a field named timestamp. It is
encapsulated in Kafka010Fetcher.
> How can I get the timestamp when I write a flink job?

Kafka010Fetcher puts the timestamps into the StreamRecords that wrap your
events. If you want to access these timestamps, you can use a
ProcessFunction. The onElement method of a ProcessFunction is passed a
Context object with a timestamp method that returns the timestamp of the
element currently being processed.

David

On Tue, Dec 31, 2019 at 3:37 PM 刘建刚  wrote:

>   In kafka010, ConsumerRecord has a field named timestamp. It is 
> encapsulated
> in Kafka010Fetcher. How can I get the timestamp when I write a flink job?
> Thank you very much.
>


How to get kafka record's timestamp in job

2019-12-31 Thread 刘建刚
  In kafka010, ConsumerRecord has a field named timestamp. It is
encapsulated
in Kafka010Fetcher. How can I get the timestamp when I write a flink job?
Thank you very much.


How to get kafka record's timestamp in job

2019-12-31 Thread 刘建刚
  In kafka010, ConsumerRecord has a field named timestamp. It is
encapsulated
in Kafka010Fetcher. How can I get the timestamp when I write a flink job?
Thank you very much.