spark环境搭好,spark-shell可以用,spark-submit提交例子程序报错

问题描述

集群3台机器,一个是2g内存做主节点,另外两个都是1g内存做从节点。想问下大神是不是我的内存太小导致的Thanks..报错如下:[hadoop@masterspark-1.3.0-bin-hadoop2.4]$./bin/spark-submit--classSimpleApp--masterspark://172.21.7.182:7077~/spark_wordcount/target/scala-2.10/simple-project_2.10-1.0.jarSparkassemblyhasbeenbuiltwithHive,includingDatanucleusjarsonclasspathUsingSpark'sdefaultlog4jprofile:org/apache/spark/log4j-defaults.properties15/04/2214:30:30WARNTaskSchedulerImpl:Initialjobhasnotacceptedanyresources;checkyourclusterUItoensurethatworkersareregisteredandhavesufficientresources15/04/2214:30:32INFOSparkDeploySchedulerBackend:Registeredexecutor:Actor[akka.tcp://sparkExecutor@bananapi:38979/user/Executor#266790798]withID115/04/2214:30:32INFOTaskSetManager:Startingtask0.0instage0.0(TID0,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:32INFOTaskSetManager:Startingtask1.0instage0.0(TID1,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:32INFOSparkDeploySchedulerBackend:Registeredexecutor:Actor[akka.tcp://sparkExecutor@bananapi:43806/user/Executor#-850130035]withID015/04/2214:30:33INFOBlockManagerMasterActor:Registeringblockmanagerbananapi:60321with267.3MBRAM,BlockManagerId(1,bananapi,60321)15/04/2214:30:33INFOBlockManagerMasterActor:Registeringblockmanagerbananapi:51018with267.3MBRAM,BlockManagerId(0,bananapi,51018)15/04/2214:30:34WARNTaskSetManager:Losttask1.0instage0.0(TID1,bananapi):java.io.IOException:java.lang.reflect.InvocationTargetExceptionatorg.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1155)atorg.apache.spark.broadcast.TorrentBroadcast.readBroadcastBlock(TorrentBroadcast.scala:164)atorg.apache.spark.broadcast.TorrentBroadcast._value$lzycompute(TorrentBroadcast.scala:64)atorg.apache.spark.broadcast.TorrentBroadcast._value(TorrentBroadcast.scala:64)atorg.apache.spark.broadcast.TorrentBroadcast.getValue(TorrentBroadcast.scala:87)atorg.apache.spark.broadcast.Broadcast.value(Broadcast.scala:70)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:58)atorg.apache.spark.scheduler.Task.run(Task.scala:64)atorg.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atjava.lang.Thread.run(Thread.java:745)Causedby:java.lang.reflect.InvocationTargetExceptionatsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)atjava.lang.reflect.Constructor.newInstance(Constructor.java:526)atorg.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:68)atorg.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:60)atorg.apache.spark.broadcast.TorrentBroadcast.org$apache$spark$broadcast$TorrentBroadcast$$setConf(TorrentBroadcast.scala:73)atorg.apache.spark.broadcast.TorrentBroadcast$$anonfun$readBroadcastBlock$1.apply(TorrentBroadcast.scala:166)atorg.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1152)...11moreCausedby:java.lang.IllegalArgumentExceptionatorg.apache.spark.io.SnappyCompressionCodec.<init>(CompressionCodec.scala:152)...20more15/04/2214:30:34INFOTaskSetManager:Losttask0.0instage0.0(TID0)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate1]15/04/2214:30:34INFOTaskSetManager:Startingtask0.1instage0.0(TID2,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:34INFOTaskSetManager:Startingtask1.1instage0.0(TID3,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:34INFOTaskSetManager:Losttask0.1instage0.0(TID2)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate2]15/04/2214:30:34INFOTaskSetManager:Startingtask0.2instage0.0(TID4,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:35INFOTaskSetManager:Losttask1.1instage0.0(TID3)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate3]15/04/2214:30:35INFOTaskSetManager:Startingtask1.2instage0.0(TID5,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:35INFOTaskSetManager:Losttask0.2instage0.0(TID4)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate4]15/04/2214:30:35INFOTaskSetManager:Startingtask0.3instage0.0(TID6,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:35INFOTaskSetManager:Losttask1.2instage0.0(TID5)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate5]15/04/2214:30:35INFOTaskSetManager:Startingtask1.3instage0.0(TID7,bananapi,PROCESS_LOCAL,1389bytes)15/04/2214:30:35INFOTaskSetManager:Losttask0.3instage0.0(TID6)onexecutorbananapi:java.io.IOException(java.lang.reflect.InvocationTargetException)[duplicate6]15/04/2214:30:35ERRORTaskSetManager:Task0instage0.0failed4times;abortingjob15/04/2214:30:35INFOTaskSchedulerImpl:Cancellingstage015/04/2214:30:35INFOTaskSchedulerImpl:Stage0wascancelled15/04/2214:30:35INFODAGScheduler:Job0failed:countatSimpleApp.scala:11,took20.358100sExceptioninthread"main"org.apache.spark.SparkException:Jobabortedduetostagefailure:Task0instage0.0failed4times,mostrecentfailure:Losttask0.3instage0.0(TID6,bananapi):java.io.IOException:java.lang.reflect.InvocationTargetExceptionatorg.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1155)atorg.apache.spark.broadcast.TorrentBroadcast.readBroadcastBlock(TorrentBroadcast.scala:164)atorg.apache.spark.broadcast.TorrentBroadcast._value$lzycompute(TorrentBroadcast.scala:64)atorg.apache.spark.broadcast.TorrentBroadcast._value(TorrentBroadcast.scala:64)atorg.apache.spark.broadcast.TorrentBroadcast.getValue(TorrentBroadcast.scala:87)atorg.apache.spark.broadcast.Broadcast.value(Broadcast.scala:70)atorg.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:58)atorg.apache.spark.scheduler.Task.run(Task.scala:64)atorg.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:203)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)atjava.lang.Thread.run(Thread.java:745)Causedby:java.lang.reflect.InvocationTargetExceptionatsun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeMethod)atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)atjava.lang.reflect.Constructor.newInstance(Constructor.java:526)atorg.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:68)atorg.apache.spark.io.CompressionCodec$.createCodec(CompressionCodec.scala:60)atorg.apache.spark.broadcast.TorrentBroadcast.org$apache$spark$broadcast$TorrentBroadcast$$setConf(TorrentBroadcast.scala:73)atorg.apache.spark.broadcast.TorrentBroadcast$$anonfun$readBroadcastBlock$1.apply(TorrentBroadcast.scala:166)atorg.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1152)...11moreCausedby:java.lang.IllegalArgumentExceptionatorg.apache.spark.io.SnappyCompressionCodec.<init>(CompressionCodec.scala:152)...20moreDriverstacktrace:atorg.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1203)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1192)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1191)atscala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)atscala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)atorg.apache.spark.scheduler.DAGScheduler.abortStage(DAGScheduler.scala:1191)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:693)atorg.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:693)atscala.Option.foreach(Option.scala:236)atorg.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:693)atorg.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1393)atorg.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:1354)atorg.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48)

解决方案

解决方案二:
1G的话,确实有点小。不过这样的问题,大多数都是缺少包导致的,就是说环境所需的包,你在shell中运行,应该是没有问题,但是,在submit下就比较严格了。我在用submit提交的时候,都是出现很多类似你这样的问题,大部分是缺少包,还有一部分是你在执行submit的时候,后面是需要加一些参数,或者是指定一些jar等等的。还要看你部署的方式是什么,命令也有所不同。我也是刚学不久,我说的这些只能给你一些提示而已啦
解决方案三:
java.io.IOException:io异常,是不是你脚本读写文件出问题

时间: 2024-11-02 07:29:26

spark环境搭好,spark-shell可以用,spark-submit提交例子程序报错的相关文章

mingw-Code::Blocks Windows环境下编译HelloWorld程序报错,求高手支招!

问题描述 Code::Blocks Windows环境下编译HelloWorld程序报错,求高手支招! 很简单的Hello World 程序,编译时提示: D:MinGWincludec++3.4.5bitscodecvt.h|475 这个文件中引用的 bits/codecvt_specializations.h 文件找不到 请问是哪里出了问题? ?

session-本地环境可以 安全退出,部署到服务器上就会报错!

问题描述 本地环境可以 安全退出,部署到服务器上就会报错! 本地环境运行的时候可以安全退出,部署到服务器上就会报错. 菜鸟一枚, 求大神解答!!! 谢啦 HTTP Status 500 - getAttribute: Session already invalidate type Exception report message getAttribute: Session already invalidated description The server encountered an inte

wpf 3 5启动报错-WPF程序,framework 3.5 sp1环境,启动程序报错,4.0的就没事,请高人指点

问题描述 WPF程序,framework 3.5 sp1环境,启动程序报错,4.0的就没事,请高人指点 {"未能加载文件或程序集"PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"或它的某一个依赖项.该模块应包含一个程序集清单."} 该问题如何能解 请遇到过此问题的同仁指点

qthread 线程-在linux环境下在mini2440移植QT线程程序报错

问题描述 在linux环境下在mini2440移植QT线程程序报错 在Ubuntu中QTcreator写一个QT的线程程序到mini2440开发板上时,每次打开线程程序是总是报错QThread::start: Thread creation error: 刚开始的时候,我怀疑是不是自己水平不够,写得不正确,然后我试着将qt-embedded-linux-opensource-src-4.5.3/examples/threads下的一个范例mandelbrot也按照先qmake再make的方法编译

spark streaming问题-六台机器集群,40M数据就报错,spark streaming运行例子程序wordcount

问题描述 六台机器集群,40M数据就报错,spark streaming运行例子程序wordcount 请大神帮忙解决一下:六台机器,SparkStreaming的例子程序,运行在yarn上四个计算节点(nodemanager),每台8G内存,i7处理器,想测测性能. 自己写了socket一直向一个端口发送数据,spark 接收并处理 运行十几分钟汇报错:WARN scheduler TaskSetManagerost task 0.1 in stage 265.0 :java.lang.Exc

能在eclipse调试环境中运行,但打包成jar运行就会报错,咋回事哩~

问题描述 如题,诸如这样的错:java.lang.NoClassDefFoundError:org/apache/oro/text/regex/MalformedPatternExceptionatcom.yoc.msg.gui.app.frame.JSplashWindow.start(JSplashWindow.java:56)我各种环境都装好了,不是虚拟机之类的问题,用exe4j或者j2e之类的工具把jar文件转成exe还是报同样的错-应该不是代码的问题,在eclipse里面运行正常的,小

在spark local模式下运行各种example中例子都报错,比如sparkpi,sparklr等待

问题描述 具体错误信息如下:Exceptioninthread"dag-scheduler-event-loop"java.lang.UnsatisfiedLinkError:org.xerial.snappy.SnappyNative.maxCompressedLength(I)Iatorg.xerial.snappy.SnappyNative.maxCompressedLength(NativeMethod)atorg.xerial.snappy.Snappy.maxCompres

集成IM之后DEBUG环境下可以登录,但RELEASE打包之后LOGIN就报错

问题描述 com.easemob.g.c: Can't initialize the configured debugger! 解决方案 -keep class com.easemob.* {*;}-keep class com.easemob.chat.** {*;}-keep class org.jivesoftware.** {*;}-keep class org.apache.** {*;}#另外,demo中发送表情的时候使用到反射,需要keep SmileUtils,注意前面的包名,#

Eclipse搭建C++开发环境报错Launch failed.Binary not found

问题描述: Eclipse搭建C++开发环境后,运行HelloWorld程序,报错launch failed.binary not found 解决办法: 1 C++工程右键 ---> Build Configurations ---> Build Selected---> 同时勾选Debug和Release 2 C++工程右键 ---> Run As ---> Local C/C++ Application