阿帕奇星火抛出java.lang.IllegalStateException:未读的数据块 [英] Apache Spark Throws java.lang.IllegalStateException: unread block data

查看:2541
本文介绍了阿帕奇星火抛出java.lang.IllegalStateException:未读的数据块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在做的是:


  1. 根据网站上的文档安装星火0.9.1,与CDH4(和CDH5另一个集群)的Hadoop / HDFS的发行版一起。

  2. 构建脂肪罐子一个Spark应用与SBT然后尝试在集群上运行它

我还包含code片段,并在底部SBT DEPS。

当我GOOGLE了这一点,似乎是两个有些含糊回应:
一)在节点上不匹配的火花版本/用户code
二)需要更多的jar添加到SparkConf

现在我知道,(b)是没有成功对其他集群,而只有其中一个瓶子(这是一个胖胖的罐子)。

运行相同的code中的问题

但我不知道如何检查(一) - 它似乎星火没有任何版本检查或任何东西 - 这将是很好,如果它检查版本,并扔了错配版本例外:你有用户$ C使用X版本和节点$ C Y具有版本的Z。

我会的意见非常感激这一点。我已经提交bug报告,因为必须有一些错误星火文档,因为我已经看到了两个独立的sysadms得到完全相同的问题在不同的集群不同版本的鼎晖。 <一href=\"https://issues.apache.org/jira/browse/SPARK-1867\">https://issues.apache.org/jira/browse/SPARK-1867

例外:

 异常线程mainorg.apache.spark.SparkException:作业已中止:任务0.0:1失败的32倍(最近的失败:异常失败:java.lang.IllegalStateException:未读数据块)
    在org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1020)
    在org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1018)
    在scala.collection.mutable.ResizableArray $ class.foreach(ResizableArray.scala:59)
    在scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    在org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$abortStage(DAGScheduler.scala:1018)
    在org.apache.spark.scheduler.DAGScheduler $$ anonfun $ $的processEvent 10.apply(DAGScheduler.scala:604)
    在org.apache.spark.scheduler.DAGScheduler $$ anonfun $ $的processEvent 10.apply(DAGScheduler.scala:604)
    在scala.Option.foreach(Option.scala:236)
    在org.apache.spark.scheduler.DAGScheduler.processEvent(DAGScheduler.scala:604)
    在org.apache.spark.scheduler.DAGScheduler$$anonfun$start$1$$anon$2$$anonfun$receive$1.applyOrElse(DAGScheduler.scala:190)
    在akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
    在akka.actor.ActorCell.invoke(ActorCell.scala:456)
    在akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
    在akka.dispatch.Mailbox.run(Mailbox.scala:219)
    在akka.dispatch.ForkJoinExecutorConfigurator $ AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
    在scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
    在scala.concurrent.forkjoin.ForkJoinPool $ WorkQueue.runTask(ForkJoinPool.java:1339)
    在scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
    在scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
14/05/16 18点05分31秒INFO scheduler.TaskSetManager:损失是由于java.lang.IllegalStateException:未读数据块[重复59]

我的code片断:

  VAL的conf =新SparkConf()
               .setMaster(clusterMaster)
               .setAppName(的appName)
               .setSparkHome(sparkHome)
               .setJars(SparkContext.jarOfClass(this.getClass))的println(数=+新SparkContext(CONF).textFile(someHdfsPath).Count之间的())

我的SBT的依赖关系:

  //有关
org.apache.spark%火花core_2.10%0.9.1
org.apache.hadoop%Hadoop的客户端%2.3.0-MR1-cdh5.0.0//标准,可能无关
com.github.seratch%%awscala%[0.2,),
org.scalacheck%%scalacheck%1.10.1%测试,
org.specs2%%specs2%1.14%测试,
org.scala琅%斯卡拉反省%2.10.3
org.scalaz%%scalaz核%7.0.5
net.minidev%JSON-智能%1.2


解决方案

修改

org.apache.hadoop%Hadoop的客户端%2.3.0-MR1-cdh5.0.0

org.apache.hadoop%Hadoop的常见的%2.3.0-cdh5.0.0

在我的应用程序code似乎解决这​​个问题。不完全知道为什么。我们有群集上的Hadoop纱,所以也许MR1爆发的东西。

What we are doing is:

  1. Installing Spark 0.9.1 according to the documentation on the website, along with CDH4 (and another cluster with CDH5) distros of hadoop/hdfs.
  2. Building a fat jar with a Spark app with sbt then trying to run it on the cluster

I've also included code snippets, and sbt deps at the bottom.

When I've Googled this, there seems to be two somewhat vague responses: a) Mismatching spark versions on nodes/user code b) Need to add more jars to the SparkConf

Now I know that (b) is not the problem having successfully run the same code on other clusters while only including one jar (it's a fat jar).

But I have no idea how to check for (a) - it appears Spark doesn't have any version checks or anything - it would be nice if it checked versions and threw a "mismatching version exception: you have user code using version X and node Y has version Z".

I would be very grateful for advice on this. I've submitted a bug report, because there has to be something wrong with the Spark documentation because I've seen two independent sysadms get the exact same problem with different versions of CDH on different clusters. https://issues.apache.org/jira/browse/SPARK-1867

The exception:

Exception in thread "main" org.apache.spark.SparkException: Job aborted: Task 0.0:1 failed 32 times (most recent failure: Exception failure: java.lang.IllegalStateException: unread block data)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1020)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$org$apache$spark$scheduler$DAGScheduler$$abortStage$1.apply(DAGScheduler.scala:1018)
    at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
    at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
    at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$abortStage(DAGScheduler.scala:1018)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$processEvent$10.apply(DAGScheduler.scala:604)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$processEvent$10.apply(DAGScheduler.scala:604)
    at scala.Option.foreach(Option.scala:236)
    at org.apache.spark.scheduler.DAGScheduler.processEvent(DAGScheduler.scala:604)
    at org.apache.spark.scheduler.DAGScheduler$$anonfun$start$1$$anon$2$$anonfun$receive$1.applyOrElse(DAGScheduler.scala:190)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
    at akka.actor.ActorCell.invoke(ActorCell.scala:456)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
    at akka.dispatch.Mailbox.run(Mailbox.scala:219)
    at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
    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)
14/05/16 18:05:31 INFO scheduler.TaskSetManager: Loss was due to java.lang.IllegalStateException: unread block data [duplicate 59]

My code snippet:

val conf = new SparkConf()
               .setMaster(clusterMaster)
               .setAppName(appName)
               .setSparkHome(sparkHome)
               .setJars(SparkContext.jarOfClass(this.getClass))

println("count = " + new SparkContext(conf).textFile(someHdfsPath).count())

My SBT dependencies:

// relevant
"org.apache.spark" % "spark-core_2.10" % "0.9.1",
"org.apache.hadoop" % "hadoop-client" % "2.3.0-mr1-cdh5.0.0",

// standard, probably unrelated
"com.github.seratch" %% "awscala" % "[0.2,)",
"org.scalacheck" %% "scalacheck" % "1.10.1" % "test",
"org.specs2" %% "specs2" % "1.14" % "test",
"org.scala-lang" % "scala-reflect" % "2.10.3",
"org.scalaz" %% "scalaz-core" % "7.0.5",
"net.minidev" % "json-smart" % "1.2"

解决方案

Changing

"org.apache.hadoop" % "hadoop-client" % "2.3.0-mr1-cdh5.0.0",

to

"org.apache.hadoop" % "hadoop-common" % "2.3.0-cdh5.0.0"

In my application code seemed to fix this. Not entirely sure why. We have hadoop-yarn on the cluster, so maybe the "mr1" broke things.

这篇关于阿帕奇星火抛出java.lang.IllegalStateException:未读的数据块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆