SteNicholas commented on code in PR #306:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/306#discussion_r917377296


##########
examples/flink-python-example/README.md:
##########
@@ -0,0 +1,83 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Flink Kubernetes Operator Python Example
+
+## Overview
+
+This is an end-to-end example of running Flink Python jobs using the Flink 
Kubernetes Operator.
+
+
+*What's in this example?*
+
+ 1. Python script of a simple streaming job

Review Comment:
   Why is the Python example only for streaming job? Why not support batch job 
together?



##########
examples/flink-python-example/README.md:
##########
@@ -0,0 +1,83 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Flink Kubernetes Operator Python Example
+
+## Overview
+
+This is an end-to-end example of running Flink Python jobs using the Flink 
Kubernetes Operator.
+
+
+*What's in this example?*
+
+ 1. Python script of a simple streaming job
+ 2. DockerFile to build custom image with pyflink and python demo
+ 3. Example YAML for submitting the python job using the operator
+
+## How does it work?
+
+Flink supports Python jobs in application mode by utilizing 
`org.apache.flink.client.python.PythonDriver` class as the 
+entry class. With the Flink Kubernetes Operator, we can reuse this class to 
run Python jobs as well. 
+
+The class is packaged in flink-python_${scala_version}-${flink_version}.jar 
which is in the default Flink image.
+So we do not need to create a new job jar. Instead, we just set `entryClass` 
of the job crd to 
+`org.apache.flink.client.python.PythonDriver`. After applying the job yaml, 
the launched job manager pod will run the `main()` 
+method of PythonDriver and parse arguments declared in the `args` field of the 
job crd.
+
+Note, in `args` field, users must either specify `-py` option or `-pym` 
option. 

Review Comment:
   Could the document of `args` provide user with 
[submitting-pyflink-jobs](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/cli/#submitting-pyflink-jobs)
 reference? Otherwise the user doesn't know other PyFlink submission arguments.



##########
examples/flink-python-example/Dockerfile:
##########
@@ -0,0 +1,41 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+FROM flink:1.15.0
+
+
+RUN apt-get update -y && \

Review Comment:
   Add the comments `install python3: it has updated Python to 3.9 in Debian 11 
and so install Python 3.7 from source`, `it currently only supports Python 3.6, 
3.7 and 3.8 in PyFlink officially.` or add the comments for the link: 
[using-flink-python-on-docker](https://nightlies.apache.org/flink/flink-docs-release-1.15/docs/deployment/resource-providers/standalone/docker/#using-flink-python-on-docker)



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to