File tree Expand file tree Collapse file tree 3 files changed +8
-22
lines changed Expand file tree Collapse file tree 3 files changed +8
-22
lines changed Original file line number Diff line number Diff line change 8888 EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar"
8989 if [[ ${{ inputs.flink-version }} == v2* ]]; then
9090 EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming/2.0-preview1/flink-examples-streaming-2.0-preview1.jar"
91+ elif [[ "${{ inputs.test }}" == "test_batch_job.sh" ]]; then
92+ EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming/1.20.1/flink-examples-streaming-1.20.1.jar"
9193 fi
9294 ESCAPED_EXAMPLES_JAR=$(printf '%s\n' "$EXAMPLES_JAR" | sed -e 's/[\/&]/\\&/g')
9395
Original file line number Diff line number Diff line change 3131 nginx.ingress.kubernetes.io/rewrite-target : " /$2"
3232 flinkConfiguration :
3333 taskmanager.numberOfTaskSlots : " 2"
34- high-availability.type : kubernetes
35- high-availability.storageDir : file:///opt/flink/volume/flink-ha
36- state.checkpoints.dir : file:///opt/flink/volume/flink-cp
37- state.savepoints.dir : file:///opt/flink/volume/flink-sp
3834 kubernetes.operator.snapshot.resource.enabled : " false"
3935 serviceAccount : flink
4036 podTemplate :
5955 volumeMounts :
6056 - mountPath : /opt/flink/usrlib
6157 name : flink-artifact
62- - mountPath : /opt/flink/volume
63- name : flink-volume
6458 volumes :
6559 - name : flink-artifact
6660 emptyDir : { }
67- - name : flink-volume
68- persistentVolumeClaim :
69- claimName : flink-example-wordcount-batch
7061 jobManager :
7162 resource :
7263 memory : " 1024m"
8374 upgradeMode : stateless
8475 mode : native
8576
86- ---
87- apiVersion : v1
88- kind : PersistentVolumeClaim
89- metadata :
90- name : flink-example-wordcount-batch
91- spec :
92- accessModes :
93- - ReadWriteOnce
94- volumeMode : Filesystem
95- resources :
96- requests :
97- storage : 1Gi
98-
9977---
10078apiVersion : networking.k8s.io/v1
10179kind : IngressClass
Original file line number Diff line number Diff line change 2525# 5. Verifies that the job remains in the FINISHED state (second check).
2626# 6. Checks the operator logs for the expected job state transition message.
2727# 7. Checks the JobManager logs for successful application completion.
28+ # 8. Applies a spec change to the FlinkDeployment and verifies the job re-runs successfully.
2829SCRIPT_DIR=$( dirname " $( readlink -f " $0 " ) " )
2930source " ${SCRIPT_DIR} /utils.sh"
3031
@@ -57,4 +58,9 @@ wait_for_operator_logs "$operator_pod_name" "Job status changed from .* to FINIS
5758jm_pod_name=$( get_jm_pod_name $CLUSTER_ID )
5859wait_for_logs " $jm_pod_name " " Application completed SUCCESSFULLY" ${TIMEOUT} || exit 1
5960
61+ # Apply a spec change; verify the job re-runs and reaches the FINISHED state.
62+ kubectl patch flinkdep ${CLUSTER_ID} --type merge --patch ' {"spec":{"job": {"parallelism": 1 } } }'
63+ wait_for_status $APPLICATION_IDENTIFIER ' .status.jobStatus.state' RECONCILING $TIMEOUT || exit 1
64+ wait_for_status $APPLICATION_IDENTIFIER ' .status.jobStatus.state' FINISHED $TIMEOUT || exit 1
65+
6066echo " Successfully ran the batch job test"
You can’t perform that action at this time.
0 commit comments