dianfu 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_r349911714
 
 

 ##########
 File path: 
flink-python/src/main/java/org/apache/flink/streaming/api/operators/python/AbstractPythonFunctionOperator.java
 ##########
 @@ -275,4 +287,27 @@ private void invokeFinishBundle() throws Exception {
                        }
                }
        }
+
+       protected PythonEnvironmentManager createPythonEnvironmentManager() 
throws IOException {
+               PythonDependencyManager dependencyManager = 
PythonDependencyManager.create(
+                       getExecutionConfig().getGlobalJobParameters().toMap(),
+                       getRuntimeContext().getDistributedCache());
+               PythonEnv pythonEnv = getPythonEnv();
+               if (pythonEnv.getExecType() == PythonEnv.ExecType.PROCESS) {
+                       String taskManagerLogFile = getContainingTask()
+                               .getEnvironment()
+                               .getTaskManagerInfo()
+                               .getConfiguration()
+                               
.getString(ConfigConstants.TASK_MANAGER_LOG_PATH_KEY, 
System.getProperty("log.file"));
+                       String logDirectory = taskManagerLogFile == null ? null 
: new File(taskManagerLogFile).getParent();
 
 Review comment:
   In which case taskManagerLogFile is null?

----------------------------------------------------------------
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

Reply via email to