Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call methods on a stopped SparkContext #5

Open
kebodev opened this issue Jul 17, 2016 · 3 comments
Open

Cannot call methods on a stopped SparkContext #5

kebodev opened this issue Jul 17, 2016 · 3 comments

Comments

@kebodev
Copy link

kebodev commented Jul 17, 2016

I installed PredictionIO 0.9.6 everything is running. After that I install PredictionIO-Churn-Prediction-H2O-Sparkling-Water engine. The engine is running too. I can see here https://localhost:8000/ the running engine server.

I'm trying to create a query like this way:

curl -k -H "Content-Type: application/json" -d '{'intlPlan': True, 'voiceMailPlan': True, 'numVmailMsg': 41, 'totalDayMins': 173.1, 
    'totalDayCalls': 85, 'totalDayCharge': 29.43, 'totalEveMins': 203.9, 'totalEveCalls': 107, 
    'totalEveCharge': 17.33, 'totalNightMins': 122.2, 'totalNightCalls': 78, 'totalNightCharge': 14.02, 
    'totalIntlMins': 10.0, 'totalIntlCalls': 15, 'totalIntlCharge': 3.94, 'customerServiceCalls': 0}' https://localhost:8000/queries.json

It's throw an exception:

ERROR] [ServerActor] Query:
{intlPlan: True, voiceMailPlan: True, numVmailMsg: 41, totalDayMins: 173.1, 
    totalDayCalls: 85, totalDayCharge: 29.43, totalEveMins: 203.9, totalEveCalls: 107, 
    totalEveCharge: 17.33, totalNightMins: 122.2, totalNightCalls: 78, totalNightCharge: 14.02, 
    totalIntlMins: 10.0, totalIntlCalls: 15, totalIntlCharge: 3.94, customerServiceCalls: 0}

Stack Trace:
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)

Can anybody help me? what am i doing wrong?

Thank you!

@ygtctn
Copy link

ygtctn commented Aug 23, 2016

I have a same problem with you and I can't solve this issue. Could please inform me about your situation? Can you solve the problem?

Thanks.

@wukaishanda08
Copy link

I met the same problem...Is there any solution?

@ygtctn
Copy link

ygtctn commented Dec 9, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants