java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext

Stack Overflow | solarenqu | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Prediction IO - Cannot call methods on a stopped SparkContext

    Stack Overflow | 7 months ago | solarenqu
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext
  2. 0

    Cannot call methods on a stopped SparkContext

    GitHub | 2 months ago | wukaishanda08
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext
  3. 0

    Cannot call methods on a stopped SparkContext

    Google Groups | 7 months ago | Kuli Gábor
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Apache Spark User List - stopped SparkContext remaining active

    nabble.com | 9 months ago
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext
  6. 0

    {noformat} [info] - should not make multiple clusters when writing multiple RDDs *** FAILED *** (130 milliseconds) [info] java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext [info] at org.apache.spark.SparkContext.org$apache$spark$SparkContext$$assertNotStopped(SparkContext.scala:103) [info] at org.apache.spark.SparkContext.defaultParallelism(SparkContext.scala:1912) [info] at org.apache.spark.SparkContext.parallelize$default$2(SparkContext.scala:695) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9$$anonfun$apply$mcV$sp$1.apply$mcVI$sp(CassandraConnectorSpec.scala:109) [info] at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply$mcV$sp(CassandraConnectorSpec.scala:108) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply(CassandraConnectorSpec.scala:103) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply(CassandraConnectorSpec.scala:103) [info] at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22) [info] at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85) [info] at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104) [info] at org.scalatest.Transformer.apply(Transformer.scala:22) [info] at org.scalatest.Transformer.apply(Transformer.scala:20) [info] at org.scalatest.FlatSpecLike$$anon$1.apply(FlatSpecLike.scala:1647) [info] at org.scalatest.Suite$class.withFixture(Suite.scala:1122) [info] at org.scalatest.FlatSpec.withFixture(FlatSpec.scala:1683) [info] at org.scalatest.FlatSpecLike$class.invokeWithFixture$1(FlatSpecLike.scala:1644) [info] at org.scalatest.FlatSpecLike$$anonfun$runTest$1.apply(FlatSpecLike.scala:1656) [info] at org.scalatest.FlatSpecLike$$anonfun$runTest$1.apply(FlatSpecLike.scala:1656) [info] at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306) [info] at org.scalatest.FlatSpecLike$class.runTest(FlatSpecLike.scala:1656) [info] at org.scalatest.FlatSpec.runTest(FlatSpec.scala:1683) [info] at org.scalatest.FlatSpecLike$$anonfun$runTests$1.apply(FlatSpecLike.scala:1714) [info] at org.scalatest.FlatSpecLike$$anonfun$runTests$1.apply(FlatSpecLike.scala:1714) [info] at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413) [info] at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) [info] at scala.collection.immutable.List.foreach(List.scala:318) [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) [info] at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:390) [info] at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:427) [info] at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401) [info] at scala.collection.immutable.List.foreach(List.scala:318) [info] at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401) [info] at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396) [info] at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483) [info] at org.scalatest.FlatSpecLike$class.runTests(FlatSpecLike.scala:1714) [info] at org.scalatest.FlatSpec.runTests(FlatSpec.scala:1683) [info] at org.scalatest.Suite$class.run(Suite.scala:1424) [info] at org.scalatest.FlatSpec.org$scalatest$FlatSpecLike$$super$run(FlatSpec.scala:1683) [info] at org.scalatest.FlatSpecLike$$anonfun$run$1.apply(FlatSpecLike.scala:1760) [info] at org.scalatest.FlatSpecLike$$anonfun$run$1.apply(FlatSpecLike.scala:1760) [info] at org.scalatest.SuperEngine.runImpl(Engine.scala:545) [info] at org.scalatest.FlatSpecLike$class.run(FlatSpecLike.scala:1760) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec.org$scalatest$BeforeAndAfterAll$$super$run(CassandraConnectorSpec.scala:14) [info] at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257) [info] at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256) [info] at com.datastax.spark.connector.cql.CassandraConnectorSpec.run(CassandraConnectorSpec.scala:14) [info] at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:466) [info] at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:677) [info] at sbt.ForkMain$Run$2.call(ForkMain.java:294) [info] at sbt.ForkMain$Run$2.call(ForkMain.java:284) [info] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [info] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [info] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [info] at java.lang.Thread.run(Thread.java:745) {noformat}

    DataStax JIRA | 1 year ago | Piotr Kołaczkowski
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Cannot call methods on a stopped SparkContext

      at org.apache.spark.SparkContext.org$apache$spark$SparkContext$$assertNotStopped()
    2. Spark
      SparkContext.parallelize$default$2
      1. org.apache.spark.SparkContext.org$apache$spark$SparkContext$$assertNotStopped(SparkContext.scala:104)
      2. org.apache.spark.SparkContext.defaultParallelism(SparkContext.scala:2061)
      3. org.apache.spark.SparkContext.parallelize$default$2(SparkContext.scala:723)
      3 frames
    3. Unknown
      Algorithm.predict
      1. Algorithm.predict(Algorithm.scala:56)
      2. Algorithm.predict(Algorithm.scala:9)
      2 frames
    4. io.prediction.controller
      P2LAlgorithm.predictBase
      1. io.prediction.controller.P2LAlgorithm.predictBase(P2LAlgorithm.scala:70)
      1 frame
    5. io.prediction.workflow
      ServerActor$$anonfun$24$$anonfun$25.apply
      1. io.prediction.workflow.ServerActor$$anonfun$24$$anonfun$25.apply(CreateServer.scala:536)
      2. io.prediction.workflow.ServerActor$$anonfun$24$$anonfun$25.apply(CreateServer.scala:535)
      2 frames
    6. Scala
      AbstractTraversable.map
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      3. scala.collection.immutable.List.foreach(List.scala:318)
      4. scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      5. scala.collection.AbstractTraversable.map(Traversable.scala:105)
      5 frames
    7. io.prediction.workflow
      ServerActor$$anonfun$24.apply
      1. io.prediction.workflow.ServerActor$$anonfun$24.apply(CreateServer.scala:535)
      2. io.prediction.workflow.ServerActor$$anonfun$24.apply(CreateServer.scala:513)
      2 frames
    8. Spray Routing
      ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply
      1. spray.routing.ApplyConverterInstances$$anon$22$$anonfun$apply$1.apply(ApplyConverterInstances.scala:25)
      2. spray.routing.ApplyConverterInstances$$anon$22$$anonfun$apply$1.apply(ApplyConverterInstances.scala:24)
      3. spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1$$anonfun$apply$1.apply(Directive.scala:38)
      4. spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1$$anonfun$apply$1.apply(Directive.scala:37)
      5. spray.routing.directives.BasicDirectives$$anon$1.happly(BasicDirectives.scala:26)
      6. spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1.apply(Directive.scala:37)
      7. spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1.apply(Directive.scala:36)
      8. spray.routing.directives.BasicDirectives$$anon$2.happly(BasicDirectives.scala:79)
      9. spray.routing.Directive$$anon$7$$anonfun$happly$4.apply(Directive.scala:86)
      10. spray.routing.Directive$$anon$7$$anonfun$happly$4.apply(Directive.scala:86)
      11. spray.routing.directives.BasicDirectives$$anon$3$$anonfun$happly$1.apply(BasicDirectives.scala:92)
      12. spray.routing.directives.BasicDirectives$$anon$3$$anonfun$happly$1.apply(BasicDirectives.scala:92)
      13. spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply$mcV$sp(ExecutionDirectives.scala:89)
      14. spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply(ExecutionDirectives.scala:89)
      15. spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply(ExecutionDirectives.scala:89)
      15 frames
    9. Scala
      ForkJoinWorkerThread.run
      1. scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
      2. scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
      3. scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)
      4. scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
      5. scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
      6. scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
      7. scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
      7 frames