我有一个使用SBT 0.13.7,斯卡拉2.11.4组装一个Spark应用程序,和Spark 1.2.0。 我在Mac OSX约塞米蒂运行。
在build.sbt,我用星火依赖“提供”。 我可以SBT内运行应用程序的罚款。
我遇到问题时,我尝试在命令行中运行它。 下面是我用命令:
ADD_JARS=analysis/target/scala-2.11/dtex-analysis_2.11-0.1.jar scala -cp /Applications/spark-1.2.0-bin-hadoop2.4/lib/spark-assembly-1.2.0-hadoop2.4.0.jar:analysis/target/scala-2.11/dtex-analysis_2.11-0.1.jar com.dtex.analysis.transform.GenUserSummaryView
我得到下面的下面的错误消息。 请告知我能做些什么来解决这个问题。 谢谢!
阿伦
15/01/12 22:47:18 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
15/01/12 22:47:18 WARN BlockManager: Putting block broadcast_0 failed
java.lang.NoSuchMethodError: scala.collection.immutable.$colon$colon.hd$1()Ljava/lang/Object;
at org.apache.spark.util.collection.SizeTracker$class.takeSample(SizeTracker.scala:84)
at org.apache.spark.util.collection.SizeTracker$class.resetSamples(SizeTracker.scala:61)
at org.apache.spark.util.collection.SizeTrackingVector.resetSamples(SizeTrackingVector.scala:25)
at org.apache.spark.util.collection.SizeTracker$class.$init$(SizeTracker.scala:51)
at org.apache.spark.util.collection.SizeTrackingVector.<init>(SizeTrackingVector.scala:25)
at org.apache.spark.storage.MemoryStore.unrollSafely(MemoryStore.scala:236)
at org.apache.spark.storage.MemoryStore.putIterator(MemoryStore.scala:136)
at org.apache.spark.storage.MemoryStore.putIterator(MemoryStore.scala:114)
at org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:787)
at org.apache.spark.storage.BlockManager.putIterator(BlockManager.scala:638)
at org.apache.spark.storage.BlockManager.putSingle(BlockManager.scala:992)
at org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:98)
at org.apache.spark.broadcast.TorrentBroadcast.<init>(TorrentBroadcast.scala:84)
at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
at org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:29)
at org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:62)
at org.apache.spark.SparkContext.broadcast(SparkContext.scala:945)
at org.apache.spark.SparkContext.hadoopFile(SparkContext.scala:695)
at org.apache.spark.SparkContext.textFile(SparkContext.scala:540)
at com.dtex.analysis.transform.TransformUtils$anonfun$2.apply(TransformUtils.scala:97)
at com.dtex.analysis.transform.TransformUtils$anonfun$2.apply(TransformUtils.scala:97)
at scala.collection.TraversableLike$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.TraversableLike$anonfun$map$1.apply(TraversableLike.scala:245)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
at com.dtex.analysis.transform.TransformUtils$.generateUserSummaryData(TransformUtils.scala:97)
at com.dtex.analysis.transform.GenUserSummaryView$.main(GenUserSummaryView.scala:77)
at com.dtex.analysis.transform.GenUserSummaryView.main(GenUserSummaryView.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:483)
at scala.reflect.internal.util.ScalaClassLoader$anonfun$run$1.apply(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:101)
at scala.reflect.internal.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)
at scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:22)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:39)
at scala.tools.nsc.CommonRunner$class.runAndCatch(ObjectRunner.scala:29)
at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:39)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:65)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)