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

Stephan Ewen edited comment on FLINK-21626 at 3/22/21, 12:17 PM:
-----------------------------------------------------------------

I agree. The consensus between all committers that I know is that the 
collection execution is nothing we consider relevant for any API. 

Having an optional return type here is overly cumbersome for users. Better 
throw an exception in the collection execution environment, or return {{new 
JobID(0, 0)}}, like we do in the first Kubernetes Job Mode case.


was (Author: stephanewen):
I agree. The consensus between all committers that I know is that the 
collection execution is nothing we consider relevant for any API. 

Having an optional return type here is overly cumbersome for users. Better 
throw an exception in the collection execution environment. 

> Consider shaping newly introduced RuntimeContext.getJobId to return JobID 
> with no Optional wrapper
> --------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-21626
>                 URL: https://issues.apache.org/jira/browse/FLINK-21626
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / Core
>    Affects Versions: 1.13.0
>            Reporter: Kezhu Wang
>            Priority: Blocker
>             Fix For: 1.13.0
>
>
> Currently, this newly introduced {{RuntimeContext.getJobId()}} returns 
> {{Optional<JobID>}}. The only path where it returns no job id is 
> {{RuntimeUDFContext}}(through {{CollectionExecutor}} through 
> {{CollectionEnvironment}}).
> But after {{DataSet}} dropped, there will be no paths to return no job id. 
> Both FLINK-21581 and [my 
> comment|https://github.com/apache/flink/pull/15053#issuecomment-789410967] 
> raised this concern. But different with FLINK-21581, I think we could return 
> an environment/executor/plan level unique job id in {{RuntimeUDFContext}} for 
> this new api. This way there will be no breaking change after {{DataSet}} 
> dropped. And more importantly, a careful chosen job id does not hurt callers 
> of {{RuntimeUDFContext}} in my opinion.
> cc  [~chesnay] [~roman_khachatryan] [~aljoscha] [~sewen] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to