Package org.apache.flink.streaming.examples.dsv2.eventtime
package org.apache.flink.streaming.examples.dsv2.eventtime
-
ClassDescriptionThis example illustrates how to count the number of clicks on each news at 1 hour after news publication.This process function will consume
CountNewsClicks.NewsEventand count the number of clicks within 1 hour of the news publication and send the resultsCountNewsClicks.NewsClicksto the output.TheCountNewsClicks.NewsClicksrepresents the number of clicks on news within one hour following its publication.TheCountNewsClicks.NewsEventrepresents an event on news, containing the event type, news id and the timestamp.The type ofCountNewsClicks.NewsEvent, note that only one event of typeCountNewsClicks.NewsEventType.PUBLISHfor each news.