WeiZhong94 commented on a change in pull request #10017: [FLINK-14019][python]
add support for managing environment and dependencies of Python UDF in Flink
Python API
URL: https://github.com/apache/flink/pull/10017#discussion_r350517251
##########
File path: flink-python/bin/pyflink-udf-runner.sh
##########
@@ -23,9 +23,22 @@ if [[ "$FLINK_TESTING" = "1" ]]; then
FLINK_SOURCE_ROOT_DIR=`cd $ACTUAL_FLINK_HOME/../../../../../; pwd`
FLINK_PYTHON="${FLINK_SOURCE_ROOT_DIR}/flink-python"
if [[ ! -f "${FLINK_PYTHON}/pyflink/fn_execution/boot.py" ]]; then
- # use pyflink source code to override the pyflink.zip in PYTHONPATH
- # to ensure loading latest code
- export PYTHONPATH="$FLINK_PYTHON:$PYTHONPATH"
+ # use pyflink source code to override the pyflink.zip in PYTHONPATH
+ # to ensure loading latest code
+ export PYTHONPATH="$FLINK_PYTHON:$PYTHONPATH"
+ fi
+fi
+
+if [[ "$python" = "" ]]; then
+ python="python"
+fi
+
+if [[ "$_PYTHON_WORKING_DIR" != "" ]]; then
Review comment:
If we change it as above, sometimes users will not be able to access
archives through relative paths because the python working directory is not set
as expected.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services