当前位置:网站首页>Flink学习6:编程模型
Flink学习6:编程模型
2022-07-04 03:47:00 【hzp666】

1.接口分层
Flink提供了不同级别的接口,最底层的是状态数据流处理,最高层是SQL

1.1 状态数据流处理
通过过程函数,被继承到DataStream API中

有状态数据流处理接口,
1.2 DataStream 和 DataSet API
核心API
DataStream 用来处理有界 和 无界数据流。
DataSet API 用来处理有界 数据流。
该接口提供了大量的通用组件

另外,
DataStream 集成更底层的函数
DataSet API 对有界数据提供了额外的支持

1.3 Table API
1.以表为中心,类似关系型数据库的二维表

2.提供可比较的操作,select, group by等

3.Table API 可以自定义函数进行扩展,但在表达能力上,比不上核心API。(不过Table API代码更简洁)
4.Table API是指定程序应该执行哪些操作,而不是精确的指定程序的执行步骤
5.Table API 在执行前会进行优化,另外Table API 和 DataStream , DataSet 之间可以无缝切换。所以在程序中可以混合只用。
1.4 SQL
Flink最高级封装接口就是 flink SQL
语法和表达能力上和Table API 类似,唯一的区别就是通过使用SQL查询语言实现程序。
SQL查询和Table API 交互密切,SQL可以直接在Table API中创建的表上查询

边栏推荐
- [PaddleSeg 源码阅读] PaddleSeg 自定义数据类
- A review of reverse reinforcement learning at Virginia Tech (VT)
- LevelDB源码解读-SkipList
- SQL statement strengthening exercise (MySQL 8.0 as an example)
- Objective-C description method and type method
- Typical applications of minimum spanning tree
- 数据库SQL语句汇总,持续更新......
- pytest多进程/多线程执行测试用例
- ctf-pikachu-CSRF
- CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
猜你喜欢

Go 语言入门很简单:Go 实现凯撒密码

idea修改主体颜色
![[untitled]](/img/b5/bf76783aa428222623d760756a14d9.jpg)
[untitled]

Global exposure and roller shutter exposure of industrial cameras

The difference between bagging and boosting in machine learning

Katalon框架测试web(二十六)自动发邮件

Sales management system of lightweight enterprises based on PHP

I Build a simple microservice project

My opinion on how to effectively telecommute | community essay solicitation

*. No main manifest attribute in jar
随机推荐
智慧地铁| 云计算为城市地铁交通注入智慧
[PaddleSeg 源码阅读] PaddleSeg 自定义数据类
The maximum expiration time of client secret in azure ad application registration is modified to 2 years
Penetration practice - sqlserver empowerment
Spa in SDP
函数计算异步任务能力介绍 - 任务触发去重
JSON string conversion in unity
SDP中的SPA
STM32外接DHT11显示温湿度
LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)
Rhcsa-- day one
Is it safe to buy insurance for your children online? Do you want to buy a million dollar medical insurance for your children?
[paddleseg source code reading] normalize operation of paddleseg transform
Illustrated network: what is the hot backup router protocol HSRP?
Future源碼一觀-JUC系列
Myslq delete followed by limit
My opinion on how to effectively telecommute | community essay solicitation
JDBC 进阶
Introduction to asynchronous task capability of function calculation - task trigger de duplication
Simple dialogue system -- text classification using transformer