[ 
https://issues.apache.org/jira/browse/FLINK-7791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200259#comment-16200259
 ] 

ASF GitHub Bot commented on FLINK-7791:
---------------------------------------

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

    https://github.com/apache/flink/pull/4802#discussion_r144004816
  
    --- Diff: 
flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java ---
    @@ -420,89 +420,72 @@ protected int list(String[] args) {
                }
     
                try {
    -                   ActorGateway jobManagerGateway = 
getJobManagerGateway(options);
    -
    -                   LOG.info("Connecting to JobManager to retrieve list of 
jobs");
    -                   Future<Object> response = jobManagerGateway.ask(
    -                           
JobManagerMessages.getRequestRunningJobsStatus(),
    -                           clientTimeout);
    +                   CustomCommandLine<?> activeCommandLine = 
getActiveCustomCommandLine(options.getCommandLine());
    +                   ClusterClient client = 
activeCommandLine.retrieveCluster(options.getCommandLine(), config, 
configurationDirectory);
     
    -                   Object result;
    +                   Collection<JobDetails> jobDetails;
                        try {
    -                           result = Await.result(response, clientTimeout);
    -                   }
    -                   catch (Exception e) {
    -                           throw new Exception("Could not retrieve running 
jobs from the JobManager.", e);
    +                           CompletableFuture<Collection<JobDetails>> 
jobDetailsFuture = client.listJobs();
    --- End diff --
    
    Should we hide the fact that we are retrieving `JobDetails` internally and 
still only return a `Collection<JobStatus>`? The reason is that in the future 
we might change how we retrieve the job ids, job names plus their state.


> Integrate LIST command into REST client
> ---------------------------------------
>
>                 Key: FLINK-7791
>                 URL: https://issues.apache.org/jira/browse/FLINK-7791
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Client, REST
>    Affects Versions: 1.4.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>             Fix For: 1.4.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to