http://spark.apache.org/docs/latest/streaming-programming-guide.html#accumulators-and-broadcast-variables
On Tue, Apr 5, 2016 at 3:51 PM, Akhilesh Pathodia <pathodia.akhil...@gmail.com> wrote: > Hi, > > I am running spark jobs on yarn in cluster mode. The job reads the messages > from kafka direct stream. I am using broadcast variables and checkpointing > every 30 seconds. When I start the job first time it runs fine without any > issue. If I kill the job and restart it throws below exception in executor > upon receiving a message from kafka: > > java.io.IOException: org.apache.spark.SparkException: Failed to get > broadcast_1_piece0 of broadcast_1 > at org.apache.spark.util.Utils$.tryOrIOException(Utils.scala:1178) > at > org.apache.spark.broadcast.TorrentBroadcast.readBroadcastBlock(TorrentBroadcast.scala:165) > at > org.apache.spark.broadcast.TorrentBroadcast._value$lzycompute(TorrentBroadcast.scala:64) > at > org.apache.spark.broadcast.TorrentBroadcast._value(TorrentBroadcast.scala:64) > at > org.apache.spark.broadcast.TorrentBroadcast.getValue(TorrentBroadcast.scala:88) > at org.apache.spark.broadcast.Broadcast.value(Broadcast.scala:70) > at > net.juniper.spark.stream.LogDataStreamProcessor$2.call(LogDataStreamProcessor.java:177) > at > net.juniper.spark.stream.LogDataStreamProcessor$2.call(LogDataStreamProcessor.java:1) > at > org.apache.spark.streaming.api.java.JavaDStreamLike$$anonfun$fn$1$1.apply(JavaDStreamLike.scala:172) > at > org.apache.spark.streaming.api.java.JavaDStreamLike$$anonfun$fn$1$1.apply(JavaDStreamLike.scala:172) > at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) > at scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:388) > at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:308) > at scala.collection.Iterator$class.foreach(Iterator.scala:727) > at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) > at > scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48) > at > scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103) > at > scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47) > at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273) > at scala.collection.AbstractIterator.to(Iterator.scala:1157) > at > scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265) > at scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157) > at > scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252) > at scala.collection.AbstractIterator.toArray(Iterator.scala:1157) > at > org.apache.spark.rdd.RDD$$anonfun$take$1$$anonfun$28.apply(RDD.scala:1298) > at > org.apache.spark.rdd.RDD$$anonfun$take$1$$anonfun$28.apply(RDD.scala:1298) > at > org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1850) > at > org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1850) > at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66) > at org.apache.spark.scheduler.Task.run(Task.scala:88) > at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:214) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > > If I delete the checkpoint directory hand restart the job, it runs without > any issue. > Does anyone have idea how to resolve this error? > > Spark version: 1.5.0 > CDH 5.5.1 > > Thanks, > AKhilesh --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org