xujiangfeng001 commented on code in PR #2809:
URL:
https://github.com/apache/incubator-streampark/pull/2809#discussion_r1248721141
##########
streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml:
##########
@@ -133,6 +133,14 @@
limit 1
</select>
+ <select id="getJobByClusterId" resultType="java.lang.Integer"
parameterType="java.lang.Long">
+ SELECT
+ count(1)
+ FROM t_flink_app
+ WHERE flink_cluster_id = #{clusterId}
+ limit 1
+ </select>
+
Review Comment:
> * Do we need to filter the status of the job here ?
>
> I sorted out briefly the background and logic. Assuming there is a job
with a status of cancelled but current cluster information, will this job be
counted if the cluster is abnormal?
>
> * We'd better to get a better select-id name here.
>
> Please correct me if I'm wrong.
Hi @RocMarshal @wolfboys , Regarding this issue, I found in the
implementation that due to the asynchronous monitoring of the `application` and
`flink cluster` threads, it is not possible to directly determine whether it is
an affected job based on the state in the application. I may be looking for a
more suitable implementation method. I plan to maintain the original logic
regarding this PR. If it is a job deployed in the `flink cluster`, it will be
defined as an affected job regardless of its status.
I look forward to your suggestions and responses very much.
--
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]