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

DataStax JIRA | Piotr Kołaczkowski | 1 year ago
  1. 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
  2. 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
  3. 0

    Apache Spark User List - stopped SparkContext remaining active

    nabble.com | 6 months ago
    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

    Prediction IO - Cannot call methods on a stopped SparkContext

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

    GitHub comment 195#172252690

    GitHub | 11 months ago | jramos
    java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext. This stopped SparkContext was created at: org.apache.spark.SparkContext.<init>(SparkContext.scala:147) io.prediction.workflow.SharedSparkContext$class.beforeAll(BaseTest.scala:65) io.prediction.controller.EngineSuite.beforeAll(EngineTest.scala:18) org.scalatest.BeforeAndAfterAll$class.beforeAll(BeforeAndAfterAll.scala:187) io.prediction.controller.EngineSuite.beforeAll(EngineTest.scala:18) org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:253) io.prediction.controller.EngineSuite.run(EngineTest.scala:18) org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:444) org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:651) sbt.TestRunner.runTest$1(TestFramework.scala:76) sbt.TestRunner.run(TestFramework.scala:85) sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202) sbt.TestFramework$$anon$2$$anonfun$$init$$1$$anonfun$apply$8.apply(TestFramework.scala:202) sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:185) sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:202) sbt.TestFramework$$anon$2$$anonfun$$init$$1.apply(TestFramework.scala:202) sbt.TestFunction.apply(TestFramework.scala:207) sbt.Tests$.sbt$Tests$$processRunnable$1(Tests.scala:239) sbt.Tests$$anonfun$makeSerial$1.apply(Tests.scala:245) sbt.Tests$$anonfun$makeSerial$1.apply(Tests.scala:245) The currently active SparkContext was created at: (No active 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:103)
      2. org.apache.spark.SparkContext.defaultParallelism(SparkContext.scala:1912)
      3. org.apache.spark.SparkContext.parallelize$default$2(SparkContext.scala:695)
      3 frames
    3. spark-cassandra-connector
      CassandraConnectorSpec$$anonfun$9$$anonfun$apply$mcV$sp$1.apply$mcVI$sp
      1. com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9$$anonfun$apply$mcV$sp$1.apply$mcVI$sp(CassandraConnectorSpec.scala:109)
      1 frame
    4. Scala
      Range.foreach$mVc$sp
      1. scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
      1 frame
    5. spark-cassandra-connector
      CassandraConnectorSpec$$anonfun$9.apply
      1. com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply$mcV$sp(CassandraConnectorSpec.scala:108)
      2. com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply(CassandraConnectorSpec.scala:103)
      3. com.datastax.spark.connector.cql.CassandraConnectorSpec$$anonfun$9.apply(CassandraConnectorSpec.scala:103)
      3 frames
    6. scalatest
      SuperEngine$$anonfun$traverseSubNodes$1$1.apply
      1. org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
      2. org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
      3. org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
      4. org.scalatest.Transformer.apply(Transformer.scala:22)
      5. org.scalatest.Transformer.apply(Transformer.scala:20)
      6. org.scalatest.FlatSpecLike$$anon$1.apply(FlatSpecLike.scala:1647)
      7. org.scalatest.Suite$class.withFixture(Suite.scala:1122)
      8. org.scalatest.FlatSpec.withFixture(FlatSpec.scala:1683)
      9. org.scalatest.FlatSpecLike$class.invokeWithFixture$1(FlatSpecLike.scala:1644)
      10. org.scalatest.FlatSpecLike$$anonfun$runTest$1.apply(FlatSpecLike.scala:1656)
      11. org.scalatest.FlatSpecLike$$anonfun$runTest$1.apply(FlatSpecLike.scala:1656)
      12. org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
      13. org.scalatest.FlatSpecLike$class.runTest(FlatSpecLike.scala:1656)
      14. org.scalatest.FlatSpec.runTest(FlatSpec.scala:1683)
      15. org.scalatest.FlatSpecLike$$anonfun$runTests$1.apply(FlatSpecLike.scala:1714)
      16. org.scalatest.FlatSpecLike$$anonfun$runTests$1.apply(FlatSpecLike.scala:1714)
      17. org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
      18. org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
      18 frames
    7. Scala
      List.foreach
      1. scala.collection.immutable.List.foreach(List.scala:318)
      1 frame
    8. scalatest
      SuperEngine$$anonfun$traverseSubNodes$1$1.apply
      1. org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
      2. org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:390)
      3. org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:427)
      4. org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
      4 frames
    9. Scala
      List.foreach
      1. scala.collection.immutable.List.foreach(List.scala:318)
      1 frame
    10. scalatest
      FlatSpecLike$class.run
      1. org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
      2. org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
      3. org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
      4. org.scalatest.FlatSpecLike$class.runTests(FlatSpecLike.scala:1714)
      5. org.scalatest.FlatSpec.runTests(FlatSpec.scala:1683)
      6. org.scalatest.Suite$class.run(Suite.scala:1424)
      7. org.scalatest.FlatSpec.org$scalatest$FlatSpecLike$$super$run(FlatSpec.scala:1683)
      8. org.scalatest.FlatSpecLike$$anonfun$run$1.apply(FlatSpecLike.scala:1760)
      9. org.scalatest.FlatSpecLike$$anonfun$run$1.apply(FlatSpecLike.scala:1760)
      10. org.scalatest.SuperEngine.runImpl(Engine.scala:545)
      11. org.scalatest.FlatSpecLike$class.run(FlatSpecLike.scala:1760)
      11 frames
    11. spark-cassandra-connector
      CassandraConnectorSpec.org$scalatest$BeforeAndAfterAll$$super$run
      1. com.datastax.spark.connector.cql.CassandraConnectorSpec.org$scalatest$BeforeAndAfterAll$$super$run(CassandraConnectorSpec.scala:14)
      1 frame
    12. scalatest
      BeforeAndAfterAll$class.run
      1. org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
      2. org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
      2 frames
    13. spark-cassandra-connector
      CassandraConnectorSpec.run
      1. com.datastax.spark.connector.cql.CassandraConnectorSpec.run(CassandraConnectorSpec.scala:14)
      1 frame
    14. scalatest
      Framework$ScalaTestTask.execute
      1. org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:466)
      2. org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:677)
      2 frames
    15. SBT
      ForkMain$Run$2.call
      1. sbt.ForkMain$Run$2.call(ForkMain.java:294)
      2. sbt.ForkMain$Run$2.call(ForkMain.java:284)
      2 frames
    16. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames