Mali
03/09/2023, 10:43 AMDian Fu
03/09/2023, 11:47 AMan application with multiple jobs ?Mali
03/09/2023, 11:53 AMDian Fu
03/09/2023, 12:13 PMMali
03/09/2023, 12:18 PMapiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkDeployment
metadata:
name: test
namespace: flink
spec:
ingress:
template: "{{name}}.<http://test.com|test.com>"
className: "nginx"
annotations: {}
image: <priv pyflink repo>
imagePullPolicy: "Always"
flinkVersion: v1_16
flinkConfiguration:
taskmanager.numberOfTaskSlots: "1"
serviceAccount: flink
jobManager:
podTemplate:
apiVersion: v1
kind: Pod
metadata:
name: pod-template
spec:
serviceAccount: flink
containers:
# Do not change the main container name
- name: flink-main-container
envFrom:
- secretRef:
name: flink-secret
resource:
memory: "2048m"
cpu: 1
taskManager:
resource:
memory: "2048m"
cpu: 1
replicas: 1
---
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkSessionJob
metadata:
name: test1
namespace: flink
spec:
deploymentName: test
job:
jarURI: file:///opt/flink/opt/flink-python_2.12-1.16.1.jar # Note, this jarURI is actually a placeholder
entryClass: "org.apache.flink.client.python.PythonDriver"
args: ["-pyclientexec", "/usr/file/bin/python3", "-py", "/opt/flink/usrlib/test1.py"]
parallelism: 4
upgradeMode: stateless
---
apiVersion: <http://flink.apache.org/v1beta1|flink.apache.org/v1beta1>
kind: FlinkSessionJob
metadata:
name: test2
namespace: flink
spec:
deploymentName: test
job:
jarURI: file:///opt/flink/opt/flink-python_2.12-1.16.1.jar # Note, this jarURI is actually a placeholder
entryClass: "org.apache.flink.client.python.PythonDriver"
args: ["-pyclientexec", "/usr/file/bin/python3", "-py", "/opt/flink/usrlib/test2.py"]
parallelism: 4
upgradeMode: stateless
But i am getting “org.apache.flink.kubernetes.operator.exception.ReconciliationException: java.io.FileNotFoundException: /opt/flink/opt/flink-python_2.12-1.16.1.jar (No such file or directory)”Mali
03/09/2023, 12:20 PMGyula Fóra
03/09/2023, 12:23 PMGyula Fóra
03/09/2023, 12:24 PMGyula Fóra
03/09/2023, 12:24 PMGyula Fóra
03/09/2023, 12:24 PMMali
03/09/2023, 12:39 PMDian Fu
03/09/2023, 12:52 PMlocal:///opt/flink/opt/flink-python_2.12-1.16.1.jar instead of file:///opt/flink/opt/flink-python_2.12-1.16.1.jarMali
03/09/2023, 12:53 PMDian Fu
03/09/2023, 1:00 PMflink-python-1.16.1.jar . It has removed the 2.12 suffix since 1.16.Dian Fu
03/09/2023, 1:00 PMMali
03/09/2023, 1:01 PMBiao Geng
03/09/2023, 1:05 PMMali
03/09/2023, 2:46 PMDian Fu
03/10/2023, 1:00 AMMali
03/10/2023, 5:11 AMDian Fu
03/10/2023, 5:24 AMMali
03/10/2023, 10:46 AMDian Fu
03/11/2023, 1:56 PM"The Application Mode allows for multi-execute() applications but High-Availability is not supported in these cases. High-Availability in Application Mode is only supported for single-execute() applications.
Additionally, when any of multiple running jobs in Application Mode (submitted for example using executeAsync()) gets cancelled, all jobs will be stopped and the JobManager will shut down. Regular job completions (by the sources shutting down) are supported."
If these limitations are not much a problem for your cases, I think you could try it~Mali
03/11/2023, 1:58 PMDian Fu
03/11/2023, 2:07 PMhigh-availability to None ?
https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/deployment/config/#high-availability-1Mali
03/13/2023, 2:21 PM