有没有办法结合akka 2.3和2.2?现在我在运行这样的应用程序时遇到了AbstractMethodError.我需要在一个应用程序中同时使用它们,因为Akka 2.3带有非常有用的akka持久性模块,它非常可靠(与它的前身相反),这种可靠性在我的情况下非常重要.我已经尝试从源代码编译游戏2.2.2并将akka依赖项更改为2.3但我仍然得到相同的错误:
[ERROR] [04/01/2014 09:42:26.105] [play-akka.actor.default-dispatcher-6] [ActorSystem(play)] Uncaught error from thread [play-akka.actor.default-dispatcher-6] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.AbstractMethodError
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
at akka.actor.ActorCell.invoke(ActorCell.scala:487)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Run Code Online (Sandbox Code Playgroud) 我对scalaz-streams汇有奇怪的观察.他们工作缓慢.有谁知道为什么会这样?有没有办法改善性能?
这是我的代码的相关部分:没有接收器的版本
//p is parameter with type p: Process[Task, Pixel]
def printToImage(img: BufferedImage)(pixel: Pixel): Unit = {
img.setRGB(pixel.x, pixel.y, 1, 1, Array(pixel.rgb), 0, 0)
}
val image = getBlankImage(2000, 4000)
val result = p.runLog.run
result.foreach(printToImage(image))
Run Code Online (Sandbox Code Playgroud)
这需要大约7秒才能执行
带水槽的版本
//p is the same as before
def printToImage(img: BufferedImage)(pixel: Pixel): Unit = {
img.setRGB(pixel.x, pixel.y, 1, 1, Array(pixel.rgb), 0, 0)
}
//I've found that way of doing sink in some tutorial
def getImageSink(img: BufferedImage): Sink[Task, Pixel] = {
//I've tried here Task.delay and …Run Code Online (Sandbox Code Playgroud) 我想创建Dockerfile,它将能够构建三个不同的图像(目前一个).这些图像仅在配置文件中有所不同.
我在努力:
我必须说我没有想法:/你如何处理这种情况.在我看来,这应该是一个共同的问题.