所以我对Scala中Seq的这种行为感到困惑.
使用模式匹配时,我可以使用任何一个::或+:运算符,它们似乎可以互换
val s=Seq(1,2,3)
s match{
case x :: l => ...
Run Code Online (Sandbox Code Playgroud)
但是当我试图::在不同情况下使用时:
val s=1::Seq(2,3)
Run Code Online (Sandbox Code Playgroud)
我收到"value :: is not a member of Seq[Int]"消息.我明白我应该使用+=和=+Seq的运算符,但为什么
::只在模式匹配场景中工作?
我玩过lagom-scala-word-countActivator模板,我被迫杀死了申请流程.从那时起,嵌入式kafka无法正常工作 - 这个项目和我创建的每个新项目都无法使用.我试过了:
尽管如此,我还是无法让Lagom工作.在第一次启动时,我在日志中获得以下行:
[warn] o.a.k.c.NetworkClient - Error while fetching metadata with correlation id 1 : {wordCount=LEADER_NOT_AVAILABLE}
[warn] o.a.k.c.NetworkClient - Error while fetching metadata with correlation id 2 : {wordCount=LEADER_NOT_AVAILABLE}
[warn] o.a.k.c.NetworkClient - Error while fetching metadata with correlation id 4 : {wordCount=LEADER_NOT_AVAILABLE}
[warn] a.k.KafkaConsumerActor - Consumer interrupted with WakeupException after timeout. Message: null. Current value of akka.kafka.consumer.wakeup-timeout is 3000 milliseconds
[warn] a.k.KafkaConsumerActor - Consumer interrupted with WakeupException after timeout. Message: null. Current value …Run Code Online (Sandbox Code Playgroud)