有谁知道两个火花核心工件之间的区别? 两者都支持Spark达到1.5.1版。但是,在我的Java应用程序中使用spark-core_2.11并尝试使用spark url(spark:// masterIP:Port)连接到独立集群(Spark-1.5.1)时,我的alawys最终会遇到相同的错误/ p>
WARN ReliableDeliverySupervisor: Association with remote system [akka.tcp://sparkMaster@192.168.188.20:7077] has failed, address is now gated for [5000] ms. Reason: [Disassociated]
ERROR SparkUncaughtExceptionHandler: Uncaught exception in thread Thread[appclient-registration-retry-thread,5,main]
Master还在其日志中记录了一个compability问题:
ERROR Remoting: org.apache.spark.deploy.DeployMessages$RegisterApplication; local class incompatible: stream classdesc serialVersionUID = 352674063933172066, local class serialVersionUID = -5495080032843259921
java.io.InvalidClassException: org.apache.spark.deploy.DeployMessages$RegisterApplication; local class incompatible: stream classdesc serialVersionUID = 352674063933172066, local class serialVersionUID = -5495080032843259921
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at akka.serialization.JavaSerializer$$anonfun$1.apply(Serializer.scala:136)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
at akka.serialization.JavaSerializer.fromBinary(Serializer.scala:136)
at akka.serialization.Serialization$$anonfun$deserialize$1.apply(Serialization.scala:104)
at scala.util.Try$.apply(Try.scala:161)
at akka.serialization.Serialization.deserialize(Serialization.scala:98)
at akka.remote.serialization.MessageContainerSerializer.fromBinary(MessageContainerSerializer.scala:63)
at akka.serialization.Serialization$$anonfun$deserialize$1.apply(Serialization.scala:104)
at scala.util.Try$.apply(Try.scala:161)
at akka.serialization.Serialization.deserialize(Serialization.scala:98)
at akka.remote.MessageSerializer$.deserialize(MessageSerializer.scala:23)
at akka.remote.DefaultMessageDispatcher.payload$lzycompute$1(Endpoint.scala:58)
at akka.remote.DefaultMessageDispatcher.payload$1(Endpoint.scala:58)
at akka.remote.DefaultMessageDispatcher.dispatch(Endpoint.scala:76)
at akka.remote.EndpointReader$$anonfun$receive$2.applyOrElse(Endpoint.scala:935)
at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
at akka.remote.EndpointActor.aroundReceive(Endpoint.scala:411)
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:397)
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)
使用spark-core_2.10时一切正常。
答案 0 :(得分:6)
该错误是由于与scala版本不匹配造成的。
如果您想使用Scala 2.10,则会为scala 2.10.x和Spark 2.11.x编译Spark,当然如果它安装在您的环境中,您将需要spark-core_2.10,和Scala 2.11的spark-core_2.11。
PS:在某个时刻,我认为它也适用于scala 2.9