Shake Akka与Apache Toree发生冲突

时间:2018-05-17 22:09:33

标签: sbt akka apache-toree

我有一个具有Akka依赖关系的超级jar,我试图在Apache Toree上使用Spark(通过将spark-defaults.conf设置为spark.jars,通过/home/cdsw/uber.jar添加)。 Toree有自己的内部版本的Akka,它与超级罐子不同(超级jar = 2.5.11,Toree = 2.3.4)。为了解决这个版本的冲突,我试图遮蔽优步版的Akka,但仍然收到以下错误。我相信这是因为在超级罐中有一个reference.conf文件,而在Toree中有一个文件,而且这些文件不会相互粘合。

Exception in thread "main" akka.ConfigurationException: Type [akka.dispatch.BoundedControlAwareMessageQueueSemantics] specified as akka.actor.mailbox.requirement [akka.actor.mailbox.bounded-control-aware-queue-based] in config can't be loaded due to [akka.dispatch.BoundedControlAwareMessageQueueSemantics]
    at akka.dispatch.Mailboxes$$anonfun$2$$anonfun$apply$1.applyOrElse(Mailboxes.scala:69)
    at akka.dispatch.Mailboxes$$anonfun$2$$anonfun$apply$1.applyOrElse(Mailboxes.scala:67)
    at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
    at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:216)
    at scala.util.Try$.apply(Try.scala:192)
    at scala.util.Failure.recover(Try.scala:216)
    at akka.dispatch.Mailboxes$$anonfun$2.apply(Mailboxes.scala:67)
    at akka.dispatch.Mailboxes$$anonfun$2.apply(Mailboxes.scala:63)
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
    at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
    at scala.collection.immutable.HashMap$HashMap1.foreach(HashMap.scala:221)
    at scala.collection.immutable.HashMap$HashTrieMap.foreach(HashMap.scala:428)
    at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157)
    at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
    at akka.dispatch.Mailboxes.<init>(Mailboxes.scala:63)
    at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:593)
    at akka.actor.ActorSystem$.apply(ActorSystem.scala:141)
    at akka.actor.ActorSystem$.apply(ActorSystem.scala:108)
    at org.apache.toree.boot.layer.StandardBareInitialization$class.createActorSystem(BareInitialization.scala:71)
    at org.apache.toree.Main$$anon$1.createActorSystem(Main.scala:35)
    at org.apache.toree.boot.layer.StandardBareInitialization$class.initializeBare(BareInitialization.scala:60)
    at org.apache.toree.Main$$anon$1.initializeBare(Main.scala:35)
    at org.apache.toree.boot.KernelBootstrap.initialize(KernelBootstrap.scala:83)
    at org.apache.toree.Main$.delayedEndpoint$org$apache$toree$Main$1(Main.scala:40)
    at org.apache.toree.Main$delayedInit$body.apply(Main.scala:24)
    at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.App$$anonfun$main$1.apply(App.scala:76)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
    at scala.App$class.main(App.scala:76)
    at org.apache.toree.Main$.main(Main.scala:24)
    at org.apache.toree.Main.main(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
    at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
    at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: akka.dispatch.BoundedControlAwareMessageQueueSemantics
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:67)
    at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(DynamicAccess.scala:66)
    at scala.util.Try$.apply(Try.scala:192)
    at akka.actor.ReflectiveDynamicAccess.getClassFor(DynamicAccess.scala:66)
    at akka.dispatch.Mailboxes$$anonfun$2.apply(Mailboxes.scala:65)

我最初假设有关冲突的conf文件是否正确?如果是这样,是否可以通过sbt分离这些域?

该项目依赖于"com.typesafe.play" % "play-ws-standalone-json_2.11" % "2.0.0-M1",内部Akka版本是依赖项。

0 个答案:

没有答案