You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/12 07:44:09 UTC

[GitHub] [flink] dawidwys commented on pull request #14595: [FLINK-20871][API/DataStream] Make DataStream#executeAndCollectWithCl…

dawidwys commented on pull request #14595:
URL: https://github.com/apache/flink/pull/14595#issuecomment-758471371


   Hi @stevenzwu ,
   What is the exact motivation for the change? Is it only to be able to cancel the job after a certain number of elements? If so as far as I can tell from the code, closing the iterator from `CloseableIterator<T> executeAndCollect(String jobExecutionName)` will do the trick.
   
   Anyway, if you feel we need access to the `JobClient` I think we should fix the `ClientAndIterator` class before making it publicly accessible. Right now it is marked `Internal`. Personally I am also not the biggest fan of accessing fields directly instead of via getters. That should not be a bigger problem in an `Internal` class, but might be problematic in a public one.
   
   @sjwiesman WDYT?


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

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