flink streaming-scala-无法解析符号 map


0

我正在编写一个简单的代码来 testScala中的CEP库,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中, map为红色,并显示消息cannot resolve symbol Map

1 答案


0

哦,我的…,我在进口scala.collection.parallel.mutable代替scala.collection.mutable. 总之,我认为scala库仍然不能 job ,我的小 test没有做到,你可以 读取简单的scalaapi for CEP示例不显示任何输出


我来回答

写文章

提问题

面试题