xujiangfeng001 commented on code in PR #2826:
URL: 
https://github.com/apache/incubator-streampark/pull/2826#discussion_r1255272834


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkClusterWatcher.java:
##########
@@ -321,11 +251,9 @@ private FinalApplicationStatus 
stringConvertFinalApplicationStatus(String value)
    * @return
    */
   private ClusterState 
finalApplicationStatusConvertClusterState(FinalApplicationStatus status) {
-    switch (status) {
-      case UNDEFINED:
-        return ClusterState.RUNNING;
-      default:
-        return ClusterState.STOPPED;
+    if (status == FinalApplicationStatus.UNDEFINED) {

Review Comment:
   This is my negligence. The corresponding logic was not modified during the 
implementation of this piece of content. The logic here does not need to 
determine the `finalStatus `of the application, only the `application state` 
needs to be determined as `running` to consider the `flink cluster` as 
`running`.
   
   ```
   public enum YarnApplicationState {
     /** Application which was just created. */
     NEW,
   
     /** Application which is being saved. */
     NEW_SAVING,
   
     /** Application which has been submitted. */
     SUBMITTED,
   
     /** Application has been accepted by the scheduler */
     ACCEPTED,
   
     /** Application which is currently running. */
     RUNNING,
   
     /** Application which finished successfully. */
     FINISHED,
   
     /** Application which failed. */
     FAILED,
   
     /** Application which was terminated by a user or admin. */
     KILLED
   }
   ```



##########
streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql:
##########
@@ -438,7 +438,6 @@ drop table if exists `t_flink_cluster`;
 create table `t_flink_cluster` (
   `id` bigint not null auto_increment,
   `address` varchar(150) default null comment 'url address of cluster',
-  `job_manager_url` varchar(150) default null comment 'url address of 
jobmanager',

Review Comment:
   We need to confirm if we still need a ` job_ manager_ url`  to alleviate the 
request pressure of `resourceManager`.



##########
streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml:
##########
@@ -133,7 +133,7 @@
              limit 1
     </select>
 
-    <select id="getAffectedJobsByClusterId" resultType="java.lang.Integer" 
parameterType="java.lang.Long">
+    <select id="countJobsByClusterId" resultType="java.lang.Integer" 
parameterType="java.lang.Long">
         select
             count(1)
         from t_flink_app

Review Comment:
   > > Do we need to filter the status of the application here? [#2809 
(comment)](https://github.com/apache/incubator-streampark/pull/2809#discussion_r1242367682)
   > 
   > Thanks for your feedback. I agree with you. I think We should filter the 
status of the application
   
   It is difficult to directly query the data table for this issue. I think we 
need a cache to record the `running jobs` of each `flink cluster`.



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