flink cep流媒体:批量模式,连续还是微批量?

gv8xihay  于 2021-06-25  发布在  Flink
关注(0)|答案(1)|浏览(658)

我试图理解这个Flinkcep的例子
https://github.com/tillrohrmann/cep-monitoring ..我在分布式模式下执行了这个flink cep的例子(1个主机和3个内核)…现在我将输出写入文件,因此我的输出被写入3个文件,因为有3个内核..在其中一个文件中,我看到如下记录:

TemperatureAlert(4), For Temperature:110.60808293330018,At Timestamp : 1464259424016
TemperatureAlert(4), For Temperature:102.75469017603604,At Timestamp : 1464259486205
TemperatureAlert(4), For Temperature:110.98650912782037,At Timestamp : 1464259492214
TemperatureAlert(4), For Temperature:115.47245702561352,At Timestamp : 1464259554901
TemperatureAlert(1), For Temperature:113.65291115679136,At Timestamp : 1464259735252
TemperatureAlert(1), For Temperature:110.88374917920495,At Timestamp : 1464259795436
TemperatureAlert(1), For Temperature:116.23995588293668,At Timestamp : 1464259810056
TemperatureAlert(4), For Temperature:103.27459440260448,At Timestamp : 1464259929121
TemperatureAlert(1), For Temperature:114.53029859331343,At Timestamp : 1464259942139
TemperatureAlert(4), For Temperature:109.13921010205338,At Timestamp : 1464260060204
(4,117.14184470661019) ,1464259692594
TemperatureWarning(4,115.08289903597866) ,1464259701806
TemperatureWarning(4,113.9136297471108) ,1464259723436
TemperatureWarning(1,112.15684481878216) ,1464259733249
TemperatureWarning(1,113.65291115679136) ,1464259735252
TemperatureWarning(1,125.07387226846537) ,1464259770401
TemperatureWarning(1,100.829623781131) ,1464259776409
TemperatureWarning(4,105.76155716070109) ,1464259789027
TemperatureWarning(1,110.88374917920495) ,1464259795436
TemperatureWarning(1,110.03271176117211) ,1464259803447
TemperatureWarning(1,108.99904165096143) ,1464259809255
TemperatureWarning(1,116.23995588293668) ,1464259810056
TemperatureWarning(1,113.74475027506949) ,1464259815664
TemperatureWarning(4,118.65623814713382) ,1464259826078
TemperatureWarning(1,125.24779125130385) ,1464259877349
TemperatureWarning(4,110.38935504983476) ,1464259890467
TemperatureWarning(4,101.92222208289115) ,1464259927319
TemperatureWarning(4,103.27459440260448) ,1464259929121
TemperatureWarning(1,113.15048106140453) ,1464259937533
TemperatureWarning(1,114.53029859331343) ,1464259942139
TemperatureWarning(4,112.4172409140119) ,1464259953755
TemperatureWarning(1,107.21833971444117) ,1464259981194
TemperatureWarning(1,105.08408728033956) ,1464259981594
TemperatureWarning(4,108.83063471822507) ,1464259990608
TemperatureWarning(4,127.9723904319025) ,1464260054997
TemperatureWarning(4,106.06561268720989) ,1464260059804
TemperatureWarning(4,109.13921010205338) ,1464260060204

如果我们从第五行开始看。我们可以检查从第5行打印的所有温度表(即对于温度:113.65291115679136),我们可以在temperaturewarning中识别低于(温度:113.65291115679136出现在第15行)的温度,即我们可以识别哪些温度,警报已经打印出来了…但是从第1行到第4行生成的警报呢??你甚至可以在第11行找到同样的记录。。我的意思是,我们如何才能确定已经生成警报的温度警告??它是以批处理模式、连续模式还是微批处理模式执行流处理??

ohtdti5x

ohtdti5x1#

当在10秒内从同一机架id出现两个连续的温度事件时,会生成温度警告。
当同一机架id的20秒内连续出现两次温度警告且温度警告温度似乎在升高时,会生成温度警报。温度警报有第一次温度警告的数据
它是连续流源

相关问题