1. Vision
2. Overview
source can be divided into two types
- Source with parallelism of 1
- Multiple sources of parallelism
3. Custom Source with 1 degree of parallelism
Applicable configuration stream, how to realize a custom source with a parallelism of 1 by interacting with broadcast and time stream
- Inherit SourceFuncion and implement the run method
- The cancel method needs to be handled (Note: This method will be called when cancel is applied) • Often no fault tolerance guarantee is required
3.1 Case
Implement a custom source with parallelism of 1
package com.caozg.stream;
import org.apache.flink