0

我正在编写一个简单的代码来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 问题出在哪里?先感谢您。

4

1 回答 1

0

哦,我的...,我正在导入scala.collection.parallel.mutable而不是scala.collection.mutable. 无论如何,我认为 scala lib 仍然无法正常工作,我的小测试没有这样做,您可以阅读Simple Scala API for CEP example don't show any output

于 2016-06-17T12:24:01.913 回答