![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
实时计算
文章平均质量分 75
代码编制世界
大数据
展开
-
flink window之Window Join
基本语法:stream.join(otherStream) .where(<KeySelector>) .equalTo(<KeySelector>) .window(<WindowAssigner>) .apply(<JoinFunction>)1、Tumbling Window Join案例:val fsEnv = StreamExecutionEnvironment.getExecutionEnvironmen原创 2021-01-20 23:32:52 · 562 阅读 · 0 评论 -
flink window之四大WindowAssigner
Windows是流计算的核心。Windows将流分成有限大小的“buckets”,我们可以在其上应用聚合计算(ProcessWindowFunction,ReduceFunction,AggregateFunction或FoldFunction)等。在Flink中编写一个窗口计算的基本结构如下:Keyed Windowsstream .keyBy(...) .window(...) <- 必须制定: 窗口类型 [原创 2021-01-20 22:40:49 · 901 阅读 · 0 评论 -
flink之checkpoint、savepoint,Flink计算发布之后是否还能够修改计算算子?(指状态恢复)
1、chekpoint、savepointCheckPoint是Flink实现故障容错的一种机制,系统会根据配置的检查点定期自动对程序计算状态进行备份。一旦程序在计算过程中出现故障,系统会选择一个最近的检查点进行故障恢复。SavePoint是一种有效的运维手段,需要用户手动触发程序进行状态备份,本质也是在做CheckPoint。./bin/flink cancel -m centos:8081 -s hdfs:///savepoints f21795e74312eb06fbf0d48cb8d90489原创 2021-01-20 22:11:12 · 825 阅读 · 0 评论 -
flink之Operator State(non-keyed state)
flink介绍,flink对所有的算子都支持有状态计算,在博主之前分享的文章中,关于keyed state已经做过很详细的介绍,欢迎各位发烧友点击https://blog.csdn.net/qq_44962429/article/details/104428236交流虽然在我们平时的生产环境中,关于keyed state应用的比较多,但是对于那些基于窗口输出到外部系统的需要,为了数据不丢失或者重复输出到外部系统,sink算子也是需要进行保存状态的,接下来本文主要介绍Operator state1、Ope原创 2021-01-20 22:01:08 · 1261 阅读 · 0 评论 -
flink之Timer定时器
一、Timer简介Timer(定时器)是Flink Streaming API提供的用于感知并利用处理时间/事件时间变化的机制。最常见的使用Timer的地方就是KeyedProcessFunction。我们在其processElement()方法中注册Timer,然后覆写其onTimer()方法作为Timer触发时的回调逻辑。根据时间特征的不同:(1)处理时间——调用Context.timerService().registerProcessingTimeTimer()注册;onTimer()在系统时原创 2020-12-08 16:16:56 · 3049 阅读 · 0 评论