我尝试在我的spark集群上运行spark作业,我使用spark-ec2脚本创建了这个集群。我可以运行sparkpi示例,但每当我运行我的作业时,总是出现以下异常:
Exception in thread "main" java.io.IOException: Call to ec2-XXXXXXXXXX.compute-1.amazonaws.com/10.XXX.YYY.ZZZZ:9000 failed on local exception: java.io.EOFException
at org.apache.hadoop.ipc.Client.wrapException(Client.java:1107)
at org.apache.hadoop.ipc.Client.call(Client.java:1075)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
at com.sun.proxy.$Proxy6.setPermission(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
at com.sun.proxy.$Proxy6.setPermission(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient.setPermission(DFSClient.java:1042)
at org.apache.hadoop.hdfs.DistributedFileSystem.setPermission(DistributedFileSystem.java:531)
at org.apache.spark.util.FileLogger.createLogDir(FileLogger.scala:93)
at org.apache.spark.util.FileLogger.start(FileLogger.scala:70)
at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:71)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:252)
at com.here.traffic.collection.archiver.IsoCcMergeJob$.isoMerge(IsoCcMergeJob.scala:55)
at com.here.traffic.collection.archiver.IsoCcMergeJob$.main(IsoCcMergeJob.scala:11)
at com.here.traffic.collection.archiver.IsoCcMergeJob.main(IsoCcMergeJob.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:292)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:55)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:804)
at org.apache.hadoop.ipc.Client$Connection.run(Client.java:749)
从我读到的在互联网上寻找解决方案的内容来看,hadoop lib版本可能不匹配,但我验证了spark使用的是1.0.4,我的作业是用相同的版本编译的。
为了提供更多的上下文,我的工作是对s3中的两个文件进行左外连接,然后将结果再次放入s3。
有什么问题吗?
1条答案
按热度按时间cigdeys31#
我在使用ec2脚本时也有类似的经历,当我们使用cloudera发行版(5.1)处理集群(通过一个简单的apt-get)和jar依赖时,几乎所有的版本问题都消失了。
安装Spark:http://www.cloudera.com/content/cloudera-content/cloudera-docs/cdh5/latest/cdh5-installation-guide/cdh5ig_spark_installation.html
添加spark作为依赖项(搜索文本“spark”):
http://www.cloudera.com/content/cloudera-content/cloudera-docs/cdh5/latest/cdh-version-and-packaging-information/cdhvd_cdh5_maven_repo.html