This is an automated email from the ASF dual-hosted git repository. wangda pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/hadoop.git
commit 2c02aa6ec259128934cc5468cf66104a624d88a7 Author: Wangda Tan <[email protected]> AuthorDate: Sun Jan 6 10:25:35 2019 -0800 YARN-9160. [Submarine] Document 'PYTHONPATH' environment variable setting when using -localization options. (Zhankun Tang via wangda) Change-Id: I115b6710eb11501e21ab3e9e7cd1a87f322e5cf8 --- .../src/site/markdown/QuickStart.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-submarine/src/site/markdown/QuickStart.md b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-submarine/src/site/markdown/QuickStart.md index 8e7a956..21db6bb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-submarine/src/site/markdown/QuickStart.md +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-submarine/src/site/markdown/QuickStart.md @@ -87,6 +87,24 @@ usage: job run -localization "/user/yarn/mydir3:/opt/mydir3" -localization "./mydir1:." ``` + +#### Notes: +When using `localization` option to make a collection of dependency Python +scripts available to entry python script in the container, you may also need to + set `PYTHONPATH` environment variable as below to avoid module import error +reported from `entry_script.py`. + +``` +... job run + # the entry point + --localization entry_script.py:<path>/entry_script.py + # the dependency Python scripts of the entry point + --localization other_scripts_dir:<path>/other_scripts_dir + # the PYTHONPATH env to make dependency available to entry script + --env PYTHONPATH="<path>/other_scripts_dir" + --worker_launch_cmd "python <path>/entry_script.py ..." +``` + ### Submarine Configuration For submarine internal configuration, please create a `submarine.xml` which should be placed under `$HADOOP_CONF_DIR`. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
