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

Daniel Jouany edited comment on SPARK-10795 at 3/4/16 3:30 PM:
---------------------------------------------------------------

Hi there,
If i follow your suggestions, it works.

Our code was like that :

{code}
Import numpy as np
Import SparkContext
foo = np.genfromtext(xxxxx)
sc=SparkContext(...)
#compute
{code}
*===> It fails*

We have just moved the global variable initialization *after* the context init:

{code}
Import numpy as np
Import SparkContext
global foo
sc=SparkContext(...)
foo = np.genfromtext(xxxxx)
#compute
{code}
*===> It works perfectly*

Note that you could reproduce this behaviour with something else than a numpy 
call - eventhough not every statement does entail the crash.
The question is : why is this *non-spark* variable init interfering with the 
SparkContext ????


was (Author: djouany):
Hi there,
If i follow your suggestions, it works.

Our code was like that :

{{
Import numpy as np
Import SparkContext
foo = np.genfromtext(xxxxx)
sc=SparkContext(...)
#compute
}}

*===> It fails*

We have just moved the global variable initialization *after* the context init:

{{
Import numpy as np
Import SparkContext
global foo
sc=SparkContext(...)
foo = np.genfromtext(xxxxx)
#compute
}}
*===> It works perfectly*

Note that you could reproduce this behaviour with something else than a numpy 
call - eventhough not every statement does entail the crash.
The question is : why is this *non-spark* variable init interfering with the 
SparkContext ????

> FileNotFoundException while deploying pyspark job on cluster
> ------------------------------------------------------------
>
>                 Key: SPARK-10795
>                 URL: https://issues.apache.org/jira/browse/SPARK-10795
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>         Environment: EMR 
>            Reporter: Harshit
>
> I am trying to run simple spark job using pyspark, it works as standalone , 
> but while I deploy over cluster it fails.
> Events :
> 2015-09-24 10:38:49,602 INFO  [main] yarn.Client (Logging.scala:logInfo(59)) 
> - Uploading resource file:/usr/lib/spark/python/lib/pyspark.zip -> 
> hdfs://ip-xxxx.ap-southeast-1.compute.internal:8020/user/hadoop/.sparkStaging/application_1439967440341_0461/pyspark.zip
> Above uploading resource file is successfull , I manually checked file is 
> present in above specified path , but after a while I face following error :
> Diagnostics: File does not exist: 
> hdfs://ip-xxx.ap-southeast-1.compute.internal:8020/user/hadoop/.sparkStaging/application_1439967440341_0461/pyspark.zip
> java.io.FileNotFoundException: File does not exist: 
> hdfs://ip-1xxx.ap-southeast-1.compute.internal:8020/user/hadoop/.sparkStaging/application_1439967440341_0461/pyspark.zip



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

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

Reply via email to