Flink CEP streaming:批量模式,连续还是微批量?


0

我试图理解这个Flink CEP的例子

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

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

1 答案


0
    当同一机架id在10秒窗口中连续出现两个温度事件时,会生成温度警告。

我来回答

写文章

提问题

面试题