You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "WeiNan Zhao (Jira)" <ji...@apache.org> on 2021/10/14 07:26:00 UTC
[jira] [Created] (SPARK-37005) pyspark
os.getenv('SPARK_YARN_STAGING_DIR') can not get job path
WeiNan Zhao created SPARK-37005:
-----------------------------------
Summary: pyspark os.getenv('SPARK_YARN_STAGING_DIR') can not get job path
Key: SPARK-37005
URL: https://issues.apache.org/jira/browse/SPARK-37005
Project: Spark
Issue Type: Bug
Components: PySpark
Affects Versions: 2.4.4
Environment: python2.7
spark2.4
Reporter: WeiNan Zhao
hi, all
i commit a spark job , use spark-submit and set option --files file1,
then in code,i use
{code:java}
//代码占位符
path = str(os.environ["SPARK_YARN_STAGING_DIR"])
{code}
but path is None, this can success in java code
{code:java}
//代码占位符
spark.read().textFile(System.getenv("SPARK_YARN_STAGING_DIR") + "/README.md")
{code}
which cause this problem.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org