spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nirav patel (JIRA)" <>
Subject [jira] [Updated] (SPARK-9515) Creating JavaSparkContext with yarn-cluster mode throws NPE
Date Wed, 05 Aug 2015 23:23:06 GMT


nirav patel updated SPARK-9515:
    Summary: Creating JavaSparkContext with yarn-cluster mode throws NPE  (was: Creating JavaSparkContext
throws NPE)

> Creating JavaSparkContext with yarn-cluster mode throws NPE
> -----------------------------------------------------------
>                 Key: SPARK-9515
>                 URL:
>             Project: Spark
>          Issue Type: Bug
>          Components: Java API
>    Affects Versions: 1.3.1
>            Reporter: nirav patel
> I have spark application that runs agains YARN cluster. I run spark application as part
of my web application. I can't use spark-submit script. Way I run it is `java -cp myApp.jar
com.myapp.Application` which in turn initiate JavaSparkContext. It used to work with spark
1.0.2 and standalone cluster but now with 1.3.1 and yarn its failing.
> Caused by: java.lang.NullPointerException
> 	at org.apache.spark.deploy.yarn.ApplicationMaster$.sparkContextInitialized(ApplicationMaster.scala:580)
> 	at org.apache.spark.scheduler.cluster.YarnClusterScheduler.postStartHook(YarnClusterScheduler.scala:32)
> 	at org.apache.spark.SparkContext.<init>(SparkContext.scala:541)
> 	at<init>(JavaSparkContext.scala:61)
> Application is design is, we create singleton SparkContext object and preload few RDDs
in memory when our spring-boot application(tomcat container) starts. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message