我正在编写一个简单的代码来CEP library
在 Scala 中进行测试,maven 依赖版本1.1-SNAPSHOT。我的代码:
val res = igd.filter(_._2 == 13)
val pattern: Pattern[(Long,String,String,Long), _] = Pattern.begin[(Long,String,String,Long)]("start").where(_._3 == true).next("end").where(_._3 == false)
val patternStream: PatternStream[(Long,String,String,Long)] = CEP.pattern(res, pattern)
def selectFn(pattern : mutable.Map[String,(Long,String,String,Long)]): String = {
val startEvent = pattern.get("start").get
"Alerta:"+startEvent._1+": Pattern"
}
val patternStreamSelected = patternStream.select(selectFn(_)).print
在selecFn
地图中以红色显示cannot resolve symbol Map
问题出在哪里?先感谢您。