hawk9821 commented on code in PR #9902:
URL: https://github.com/apache/seatunnel/pull/9902#discussion_r2383752559


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/resourcemanager/opeartion/GetOverviewOperation.java:
##########
@@ -89,6 +89,8 @@ public static OverviewInfo getOverviewInfo(
         overviewInfo.setTotalSlot(assignedSlots.size() + 
unassignedSlots.size());
         overviewInfo.setUnassignedSlot(unassignedSlots.size());
         overviewInfo.setWorkers(resourceManager.workerCount(tags));
+        overviewInfo.setPendingJobs(
+                
server.getCoordinatorService().getJobCountMetrics().getPendingJobCount());

Review Comment:
   -   the constructor method of the JobHistoryService 
   ```
   jobHistoryService =
                   new JobHistoryService(
                           nodeEngine,
                           runningJobStateIMap,
                           logger,
                           pendingJobQueue.getJobIdMap(),
                           runningJobMasterMap,
                           
nodeEngine.getHazelcastInstance().getMap(Constant.IMAP_FINISHED_JOB_STATE),
                           nodeEngine
                                   .getHazelcastInstance()
                                   .getMap(Constant.IMAP_FINISHED_JOB_METRICS),
                           nodeEngine
                                   .getHazelcastInstance()
                                   
.getMap(Constant.IMAP_FINISHED_JOB_VERTEX_INFO),
                           engineConfig.getHistoryJobExpireMinutes());
   ```
   -  the getJobStatusData method of JobHistoryService  
   ```
   public List<JobStatusData> getJobStatusData() {
           List<JobStatusData> status = new ArrayList<>();
           final List<JobState> runningJobStateList =
                   runningJobMasterMap.values().stream()
                           .map(master -> toJobStateMapper(master, true))
                           .collect(Collectors.toList());
           Set<Long> runningJonIds =
                   
runningJobStateList.stream().map(JobState::getJobId).collect(Collectors.toSet());
   
           List<JobState> pendingJobStateList =
                   pendingJobInfoMap.entrySet().stream()
                           .map(
                                   entry -> {
                                       Long jobId = entry.getKey();
                                       JobImmutableInformation 
jobImmutableInformation =
                                               entry.getValue()
                                                       .getJobMaster()
                                                       
.getJobImmutableInformation();
                                       return new JobState(
                                               jobId,
                                               
jobImmutableInformation.getJobName(),
                                               JobStatus.PENDING,
                                               
jobImmutableInformation.getCreateTime(),
                                               null,
                                               null,
                                               null,
                                               null);
                                   })
                           .collect(Collectors.toList());
   ....
   ```
   jobIdMap  has been assigned to `pendingJobInfoMap` of the JobHistoryService 



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to