You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/10/20 08:03:27 UTC

[jira] [Commented] (SPARK-11201) StreamContext.getOrCreate is broken is yarn-client mode

    [ https://issues.apache.org/jira/browse/SPARK-11201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14964608#comment-14964608 ] 

Apache Spark commented on SPARK-11201:
--------------------------------------

User 'harishreedharan' has created a pull request for this issue:
https://github.com/apache/spark/pull/9174

> StreamContext.getOrCreate is broken is yarn-client mode
> -------------------------------------------------------
>
>                 Key: SPARK-11201
>                 URL: https://issues.apache.org/jira/browse/SPARK-11201
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.5.1
>            Reporter: Hari Shreedharan
>
> If {{StreamingContext.getOrCreate}} (or the constructors that create the Hadoop {{Configuration}} is used, {{SparkHadoopUtil.get.conf}}  is called before {{SparkContext}} is created - when SPARK_YARN_MODE is set. So in that case {{SparkHadoopUtil.get}} creates a {{SparkHadoopUtil}} instance instead of {{YarnSparkHadoopUtil}} instance.
> So, in yarn-client mode, a class cast exception gets thrown from {{Client.scala}}:
> {code}
> java.lang.ClassCastException: org.apache.spark.deploy.SparkHadoopUtil cannot be cast to org.apache.spark.deploy.yarn.YarnSparkHadoopUtil
> 	at org.apache.spark.deploy.yarn.YarnSparkHadoopUtil$.get(YarnSparkHadoopUtil.scala:169)
> 	at org.apache.spark.deploy.yarn.Client.prepareLocalResources(Client.scala:266)
> 	at org.apache.spark.deploy.yarn.Client.createContainerLaunchContext(Client.scala:631)
> 	at org.apache.spark.deploy.yarn.Client.submitApplication(Client.scala:120)
> 	at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:56)
> 	at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:144)
> 	at org.apache.spark.SparkContext.<init>(SparkContext.scala:523)
> 	at org.apache.spark.streaming.StreamingContext$.createNewSparkContext(StreamingContext.scala:854)
> 	at org.apache.spark.streaming.StreamingContext.<init>(StreamingContext.scala:81)
> 	at com.cloudera.test.LongRunningApp$.com$cloudera$test$LongRunningApp$$createCheckpoint$1(LongRunningApp.scala:33)
> 	at com.cloudera.test.LongRunningApp$$anonfun$4.apply(LongRunningApp.scala:90)
> 	at com.cloudera.test.LongRunningApp$$anonfun$4.apply(LongRunningApp.scala:90)
> 	at scala.Option.getOrElse(Option.scala:120)
> 	at org.apache.spark.streaming.StreamingContext$.getOrCreate(StreamingContext.scala:844)
> 	at com.cloudera.test.LongRunningApp$.main(LongRunningApp.scala:90)
> 	at com.cloudera.test.LongRunningApp.main(LongRunningApp.scala)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672)
> 	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
> 	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
> 	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
> 	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org