Use the Flink state management capabilities to compute activity durations for the use case problem. Review the recommended solution.
- In this video, I will show you … how to compute durations, based on an event stream. … Events happen at various points in time. … To compute durations, … we need to track the previous events timestamp, … and use it to compute the duration, … when the next event arrives. … We also need to track the previous events name, … since the duration would correspond to that event. … This requires the use of state variables. … In this case, … we want to track activity durations by each user. … So, we first do a key by of the user … to create state by user. … Next, we use a Rich Map Function. … In the function, we create two state variables, … last event name and last event start timestamp. … These will then be used to track the action … and timestamp that comes for the specific user. … In the open method, we set up the value descriptors, … for both the state variables and initialize those values. … In the Map Function, … we will always ignore the log and event, … since it is assumed that there is no activity …
- Streaming with Apache Flink
- Using the DataStream API for basic stream processing
- Working with process functions
- Windowing and joins
- Setting up event-time processing
- State management in Flink
Skill Level Advanced
1. Apache Flink
2. DataStream API
4. Event Time Processing
5. State Management
6. Use Case Project
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.