You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2018/06/04 10:49:38 UTC

[GitHub] flink pull request #6049: [FLINK-9398][Client] Fix CLI list running job retu...

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6049#discussion_r192696608
  
    --- Diff: flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java ---
    @@ -436,15 +440,19 @@ protected void list(String[] args) throws Exception {
     
     		final List<JobStatusMessage> runningJobs = new ArrayList<>();
     		final List<JobStatusMessage> scheduledJobs = new ArrayList<>();
    +		final List<JobStatusMessage> remainingJobs = new ArrayList<>();
     		jobDetails.forEach(details -> {
     			if (details.getJobState() == JobStatus.CREATED) {
     				scheduledJobs.add(details);
    -			} else {
    +			} else if (details.getJobState() == JobStatus.RUNNING
    --- End diff --
    
    use `JobStatus#isGloballyTerminalState` instead. This covers all cases where a job can still be considered running.


---