[jira] [Assigned] (SPARK-24384) spark-submit --py-files with .py files doesn't work in client mode before context initialization

2018-05-30 Thread Marcelo Vanzin (JIRA)


 [ 
https://issues.apache.org/jira/browse/SPARK-24384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcelo Vanzin reassigned SPARK-24384:
--

Assignee: Hyukjin Kwon

> spark-submit --py-files with .py files doesn't work in client mode before 
> context initialization
> 
>
> Key: SPARK-24384
> URL: https://issues.apache.org/jira/browse/SPARK-24384
> Project: Spark
>  Issue Type: Bug
>  Components: PySpark, Spark Submit
>Affects Versions: 2.3.0, 2.4.0
>Reporter: Hyukjin Kwon
>Assignee: Hyukjin Kwon
>Priority: Major
> Fix For: 2.3.1, 2.4.0
>
>
> In case the given Python file is .py file (zip file seems fine), seems the 
> python path is dynamically added after the context is got initialized.
> with this pyFile:
> {code}
> $ cat /home/spark/tmp.py
> def testtest():
> return 1
> {code}
> This works:
> {code}
> $ cat app.py
> import pyspark
> pyspark.sql.SparkSession.builder.getOrCreate()
> import tmp
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> ...
> 1
> {code}
> but this doesn't:
> {code}
> $ cat app.py
> import pyspark
> import tmp
> pyspark.sql.SparkSession.builder.getOrCreate()
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> Traceback (most recent call last):
>   File "/home/spark/spark/app.py", line 2, in 
> import tmp
> ImportError: No module named tmp
> {code}
> See 
> https://issues.apache.org/jira/browse/SPARK-21945?focusedCommentId=16488486=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16488486



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Assigned] (SPARK-24384) spark-submit --py-files with .py files doesn't work in client mode before context initialization

2018-05-24 Thread Apache Spark (JIRA)

 [ 
https://issues.apache.org/jira/browse/SPARK-24384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-24384:


Assignee: (was: Apache Spark)

> spark-submit --py-files with .py files doesn't work in client mode before 
> context initialization
> 
>
> Key: SPARK-24384
> URL: https://issues.apache.org/jira/browse/SPARK-24384
> Project: Spark
>  Issue Type: Bug
>  Components: PySpark, Spark Submit
>Affects Versions: 2.3.0, 2.4.0
>Reporter: Hyukjin Kwon
>Priority: Major
>
> In case the given Python file is .py file (zip file seems fine), seems the 
> python path is dynamically added after the context is got initialized.
> with this pyFile:
> {code}
> $ cat /home/spark/tmp.py
> def testtest():
> return 1
> {code}
> This works:
> {code}
> $ cat app.py
> import pyspark
> pyspark.sql.SparkSession.builder.getOrCreate()
> import tmp
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> ...
> 1
> {code}
> but this doesn't:
> {code}
> $ cat app.py
> import pyspark
> import tmp
> pyspark.sql.SparkSession.builder.getOrCreate()
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> Traceback (most recent call last):
>   File "/home/spark/spark/app.py", line 2, in 
> import tmp
> ImportError: No module named tmp
> {code}
> See 
> https://issues.apache.org/jira/browse/SPARK-21945?focusedCommentId=16488486=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16488486



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Assigned] (SPARK-24384) spark-submit --py-files with .py files doesn't work in client mode before context initialization

2018-05-24 Thread Apache Spark (JIRA)

 [ 
https://issues.apache.org/jira/browse/SPARK-24384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apache Spark reassigned SPARK-24384:


Assignee: Apache Spark

> spark-submit --py-files with .py files doesn't work in client mode before 
> context initialization
> 
>
> Key: SPARK-24384
> URL: https://issues.apache.org/jira/browse/SPARK-24384
> Project: Spark
>  Issue Type: Bug
>  Components: PySpark, Spark Submit
>Affects Versions: 2.3.0, 2.4.0
>Reporter: Hyukjin Kwon
>Assignee: Apache Spark
>Priority: Major
>
> In case the given Python file is .py file (zip file seems fine), seems the 
> python path is dynamically added after the context is got initialized.
> with this pyFile:
> {code}
> $ cat /home/spark/tmp.py
> def testtest():
> return 1
> {code}
> This works:
> {code}
> $ cat app.py
> import pyspark
> pyspark.sql.SparkSession.builder.getOrCreate()
> import tmp
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> ...
> 1
> {code}
> but this doesn't:
> {code}
> $ cat app.py
> import pyspark
> import tmp
> pyspark.sql.SparkSession.builder.getOrCreate()
> print("%s" % tmp.testtest())
> $ ./bin/spark-submit --master yarn --deploy-mode client --py-files 
> /home/spark/tmp.py app.py
> Traceback (most recent call last):
>   File "/home/spark/spark/app.py", line 2, in 
> import tmp
> ImportError: No module named tmp
> {code}
> See 
> https://issues.apache.org/jira/browse/SPARK-21945?focusedCommentId=16488486=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16488486



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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