Vu-Hoang Phan
04/12/2024, 9:42 AMFlinkDeployment CR in native, stateless Application mode. The job is bounded, it鈥檚 an hello world example (code in the comment). The job runs and finishes normally, I can see the job status is FINISHED and the lifecycle state is STABLE.
However, as the job finished, I expect the cluster to be deleted, but it is not. Only the task manager is deleted, the job manager is still there, idling.
I found this option kubernetes.operator.jm-deployment.shutdown-ttl which is default to 1 day, and changed it to 1 minute. Afterwards, the job manager was deleted but then the operator decided to spin up the cluster again, changing the CR鈥檚 status to RECONCILING and re-run the job. The job then terminates, the cluster is destroyed, and the operator spin it up again, in a loop.
I don鈥檛 think it鈥檚 a normal behaviour of a batch job. I expect a batch job in application mode would spin up a Flink cluster and tear it down after finish. Can someone shed some light on this issue please? Thanks.Vu-Hoang Phan
04/12/2024, 9:43 AMpublic static void main(String[] args) throws Exception {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setParallelism(1);
String input = "Hello World!";
env.fromElements(input).flatMap(new FlatMapFunction<String, Tuple2<String, Integer>>() {
@Override
public void flatMap(String value, Collector<Tuple2<String, Integer>> collector) throws Exception {
for (String s : value.split(" ")) {
collector.collect(Tuple2.of(s, 1));
}
}
}).keyBy(0).sum(1).print();
env.execute();
}Gyula F贸ra
04/12/2024, 9:50 AMGyula F贸ra
04/12/2024, 9:50 AMLily Liu
04/12/2024, 12:41 PMkubernetes.operator.jm-deployment-recovery.enabled: false . Just wondering if it worthing checking your settings.Gyula F贸ra
04/12/2024, 12:50 PMLily Liu
04/12/2024, 12:52 PMGyula F贸ra
04/12/2024, 12:53 PMLily Liu
04/12/2024, 12:59 PMVu-Hoang Phan
04/12/2024, 1:08 PMGyula F贸ra
04/12/2024, 1:36 PMGyula F贸ra
04/15/2024, 8:49 AMVu-Hoang Phan
04/15/2024, 9:20 AM