0
我有以下情况处理在弗林克CEP多个图案并联
有其发送流卡夫卡正在被由CEP引擎接收其中警告时产生的特定条件2的虚拟机对个人Stream满意。
目前,CEP是检查两个流上相同条件下(当心脏率> 65和呼吸率> 68)患者和如下图所示
// detecting pattern
Pattern<joinEvent, ? > pattern = Pattern.<joinEvent>begin("start")
.subtype(joinEvent.class).where(new FilterFunction<joinEvent>() {
@Override
public boolean filter(joinEvent joinEvent) throws Exception {
return joinEvent.getHeartRate() > 65 ;
}
})
.subtype(joinEvent.class)
.where(new FilterFunction<joinEvent>() {
@Override
public boolean filter(joinEvent joinEvent) throws Exception {
return joinEvent.getRespirationRate() > 68;
}
}).within(Time.milliseconds(100));
但我想用提高并行报警Streams的不同条件。例如,我想报警如果
For patient A : if heart rate > 65 and Respiration Rate > 68
For patient B : if heart rate > 75 and Respiration Rate > 78
我该如何做到这一点?是否需要在同一环境中创建多个流环境或多个模式?
嘿,我想知道你是否找到了你的问题的解决方案? –
是的,不同的病人写了不同的主题,flink有许多并行工作的工作人员,每个人都在听一个话题并执行cep –
感谢您的回复,我认为不同的病人写了同一个源/ DataStream,并且您想要应用不同的根据不同事件/患者TT的CEP模式 –