You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

咨询SPARK_SUBMIT_OPTIONS中<CPS>的含义(AWS EMR场景)

What Does Mean in SPARK_SUBMIT_OPTIONS (and Your AWS EMR Zeppelin Config)?

Great question! Let's break this down clearly:

First: What is ?

<CPS> is a placeholder that stands for Colon Path Separator (or more broadly, system path separator). It’s designed to be replaced at runtime with the correct path separator character for your operating system:

  • On Unix/Linux systems (like AWS EMR, which uses Linux under the hood), it gets replaced with a colon :
  • On Windows systems, it would be replaced with a semicolon ;

This placeholder makes configuration files cross-platform friendly—you don’t have to hardcode path separators that only work on one OS.

Applying This to Your Zeppelin Config

Looking at your specific snippet from /etc/zeppelin/conf/zeppelin-env.sh:

export SPARK_SUBMIT_OPTIONS="$SPARK_SUBMIT_OPTIONS \ --conf 'spark.executorEnv.PYTHONPATH=/usr/lib/spark/python/lib/py4j-src.zip:/usr/lib/spark/python/:<CPS>{{PWD}}/pyspark.zip<CPS>{{PWD}}/py4j-src.zip' \ --conf spark.yarn.isPython=true"

When this runs on AWS EMR, the <CPS> placeholders will be swapped out with :. The final spark.executorEnv.PYTHONPATH value that Spark uses will look like this:

/usr/lib/spark/python/lib/py4j-src.zip:/usr/lib/spark/python/:/{{PWD}}/pyspark.zip:/{{PWD}}/py4j-src.zip

The goal here is to:

  • Include Spark’s default Python dependencies (like py4j) in the executor’s Python path
  • Append custom pyspark.zip and py4j-src.zip files from Zeppelin’s current working directory, so Spark executors can access these custom resources when running Python jobs.

内容的提问来源于stack exchange,提问作者Dyno Fu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:41:28