Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-3050

Spark program running with 1.0.2 jar cannot run against a 1.0.1 cluster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.0.2
    • None
    • None
    • None

    Description

      I ran the following code with Spark 1.0.2 jar against a cluster that runs Spark 1.0.1 (i.e. localhost:7077 is running 1.0.1).

      import java.util.ArrayList;
      import java.util.List;
      
      import org.apache.spark.api.java.JavaRDD;
      import org.apache.spark.api.java.JavaSparkContext;
      
      public class TestTest {
      
          public static void main(String[] args) {
              JavaSparkContext sc = new JavaSparkContext("spark://localhost:7077", "Test");
              List<Integer> list = new ArrayList<>();
              list.add(1);
              list.add(2);
              list.add(3);
              JavaRDD<Integer> rdd = sc.parallelize(list);
              System.out.println(rdd.collect());
          }
      
      }
      

      This throws InvalidClassException.

      Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 0.0:1 failed 4 times, most recent failure: Exception failure in TID 6 on host 10.100.91.90: java.io.InvalidClassException: org.apache.spark.rdd.RDD; local class incompatible: stream classdesc serialVersionUID = -6766554341038829528, local class serialVersionUID = 385418487991259089
              java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:604)
              java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
              java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
              java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
              java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
              java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
              java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
              java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
              org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:63)
              org.apache.spark.scheduler.ResultTask$.deserializeInfo(ResultTask.scala:61)
              org.apache.spark.scheduler.ResultTask.readExternal(ResultTask.scala:141)
              java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
              java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
              java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
              java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
              org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:63)
              org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:85)
              org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:165)
              java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              java.lang.Thread.run(Thread.java:722)
      Driver stacktrace:
      	at org.apache.spark.scheduler.DAGScheduler.org$apache$spark$scheduler$DAGScheduler$$failJobAndIndependentStages(DAGScheduler.scala:1049)
      	at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1033)
      	at org.apache.spark.scheduler.DAGScheduler$$anonfun$abortStage$1.apply(DAGScheduler.scala:1031)
      	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.abortStage(DAGScheduler.scala:1031)
      	at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:635)
      	at org.apache.spark.scheduler.DAGScheduler$$anonfun$handleTaskSetFailed$1.apply(DAGScheduler.scala:635)
      	at scala.Option.foreach(Option.scala:236)
      	at org.apache.spark.scheduler.DAGScheduler.handleTaskSetFailed(DAGScheduler.scala:635)
      	at org.apache.spark.scheduler.DAGSchedulerEventProcessActor$$anonfun$receive$2.applyOrElse(DAGScheduler.scala:1234)
      	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)
      

      I thought minor version releases and patch releases should be binary-compatible. Is that not true?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkim Mingyu Kim
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: