This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.13 by this push:
     new 4c3bbc2  [FLINK-23923][python] Log the environment variables and 
command when starting Python process
4c3bbc2 is described below

commit 4c3bbc2de78b2c8b3cdd3d072598b5589286ae16
Author: Dian Fu <[email protected]>
AuthorDate: Tue Aug 24 20:20:42 2021 +0800

    [FLINK-23923][python] Log the environment variables and command when 
starting Python process
    
    This closes #16965.
---
 .../main/java/org/apache/flink/client/python/PythonEnvUtils.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git 
a/flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java 
b/flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java
index f457af5..05ed50b 100644
--- 
a/flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java
+++ 
b/flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java
@@ -280,6 +280,13 @@ final class PythonEnvUtils {
             // set the child process the output same as the parent process.
             
pythonProcessBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT);
         }
+
+        LOG.info(
+                "Starting Python process with environment variables: {{}}, 
command: {}",
+                env.entrySet().stream()
+                        .map(e -> e.getKey() + "=" + e.getValue())
+                        .collect(Collectors.joining(", ")),
+                String.join(" ", commands));
         Process process = pythonProcessBuilder.start();
         if (!process.isAlive()) {
             throw new RuntimeException("Failed to start Python process. ");

Reply via email to