Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-14392 Introduce JobClient API(FLIP-74)
  3. FLINK-15129

Return JobClient instead of JobClient Future from executeAsync()

    XMLWordPrintableJSON

Details

    Description

      Currently, users have to write this when they want to use the JobClient:

      CompletableFuture<JobClient> jobClientFuture = env.executeAsync();
      JobClient jobClient = jobClientFuture.get();
      // or use thenApply/thenCompose etc.
      

      instead we could always return a JobClient right away and therefore remove one step for the user.

      I don't know if it's always the right choice, but currently we always return an already completed future that contains the JobClient. In the future we might want to return a future that actually completes at some later point, we would not be able to do this if we directly return a JobClient and would have to block in executeAsync().

      Attachments

        Activity

          People

            aljoscha Aljoscha Krettek
            aljoscha Aljoscha Krettek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: