dianfu commented on a change in pull request #13322:
URL: https://github.com/apache/flink/pull/13322#discussion_r496702761
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgramUtils.java
##########
@@ -190,6 +193,11 @@ public static Boolean isPython(String entryPointClassName)
{
(entryPointClassName.equals(PYTHON_DRIVER_CLASS_NAME)
|| entryPointClassName.equals(PYTHON_GATEWAY_CLASS_NAME));
}
+ public static Boolean isPython(String[] programArguments){
Review comment:
```suggestion
public static boolean isPython(String[] programArguments){
```
##########
File path: docs/ops/deployment/native_kubernetes.md
##########
@@ -91,14 +96,60 @@ $ ./bin/kubernetes-session.sh \
-Dresourcemanager.taskmanager-timeout=3600000 \
-Dkubernetes.container.image=<CustomImageName>
{% endhighlight %}
+</div>
+
+<div data-lang="python" markdown="1">
+To build a custom image which has Python and Pyflink prepared, you can refer
to the following Dockerfile:
+{% highlight Dockerfile %}
+FROM flink
+
+# install python3 and pip3
+RUN apt-get update -y && \
+ apt-get install -y python3.7 python3-pip python3.7-dev && rm -rf
/var/lib/apt/lists/*
+
+# install Python Flink
Review comment:
Should we also add the following to the Dockerfile?
```
Run ln -s /usr/bin/python3 /usr/bin/python
```
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/deployment/application/ClassPathPackagedProgramRetriever.java
##########
@@ -111,6 +112,20 @@ private ClassPathPackagedProgramRetriever(
@Override
public PackagedProgram getPackagedProgram() throws FlinkException {
try {
+
Review comment:
unnecessary empty line
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/cli/ProgramOptionsUtils.java
##########
@@ -93,4 +97,25 @@ public static ProgramOptions
createPythonProgramOptions(CommandLine line) throws
"or not working as expected.", e);
}
}
+
+ public static void configurePythonExecution(Configuration
configuration, PackagedProgram packagedProgram) throws CliArgsException,
NoSuchFieldException, IllegalAccessException {
+
Review comment:
unnecessary empty line
----------------------------------------------------------------
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]