95-130-100-Source code-source-Custom Source-Introduction

1. Vision

Insert picture description here

2. Overview

source can be divided into two types

  1. Source with parallelism of 1
  2. 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

  1. Inherit SourceFuncion and implement the run method
  2. 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

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/105604210