java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Cannot call methods on a stopped SparkContext
    via by Kuli Gábor,
  • GitHub comment 195#172252690
    via GitHub by jramos
    ,
  • {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}
    via by Piotr Kołaczkowski,
  • {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}
    via by Piotr Kołaczkowski,
    • java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext at org.apache.spark.SparkContext.org$apache$spark$SparkContext$$assertNotStopped(SparkContext.scala:104) at org.apache.spark.SparkContext.defaultParallelism(SparkContext.scala:2061) at org.apache.spark.SparkContext.parallelize$default$2(SparkContext.scala:723) at Algorithm.predict(Algorithm.scala:56) at Algorithm.predict(Algorithm.scala:9) at io.prediction.controller.P2LAlgorithm.predictBase(P2LAlgorithm.scala:70) at io.prediction.workflow.ServerActor$$anonfun$24$$anonfun$25.apply(CreateServer.scala:536) at io.prediction.workflow.ServerActor$$anonfun$24$$anonfun$25.apply(CreateServer.scala:535) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.immutable.List.foreach(List.scala:318) at scala.collection.TraversableLike$class.map(TraversableLike.scala:244) at scala.collection.AbstractTraversable.map(Traversable.scala:105) at io.prediction.workflow.ServerActor$$anonfun$24.apply(CreateServer.scala:535) at io.prediction.workflow.ServerActor$$anonfun$24.apply(CreateServer.scala:513) at spray.routing.ApplyConverterInstances$$anon$22$$anonfun$apply$1.apply(ApplyConverterInstances.scala:25) at spray.routing.ApplyConverterInstances$$anon$22$$anonfun$apply$1.apply(ApplyConverterInstances.scala:24) at spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1$$anonfun$apply$1.apply(Directive.scala:38) at spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1$$anonfun$apply$1.apply(Directive.scala:37) at spray.routing.directives.BasicDirectives$$anon$1.happly(BasicDirectives.scala:26) at spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1.apply(Directive.scala:37) at spray.routing.ConjunctionMagnet$$anon$1$$anon$2$$anonfun$happly$1.apply(Directive.scala:36) at spray.routing.directives.BasicDirectives$$anon$2.happly(BasicDirectives.scala:79) at spray.routing.Directive$$anon$7$$anonfun$happly$4.apply(Directive.scala:86) at spray.routing.Directive$$anon$7$$anonfun$happly$4.apply(Directive.scala:86) at spray.routing.directives.BasicDirectives$$anon$3$$anonfun$happly$1.apply(BasicDirectives.scala:92) at spray.routing.directives.BasicDirectives$$anon$3$$anonfun$happly$1.apply(BasicDirectives.scala:92) at spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply$mcV$sp(ExecutionDirectives.scala:89) at spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply(ExecutionDirectives.scala:89) at spray.routing.directives.ExecutionDirectives$$anonfun$detach$1$$anonfun$apply$7$$anonfun$apply$3.apply(ExecutionDirectives.scala:89) at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24) at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24) at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107) 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)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    1 more bugmates