[ https://issues.apache.org/jira/browse/FLINK-21626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17306802#comment-17306802 ]
Roman Khachatryan edited comment on FLINK-21626 at 3/23/21, 6:36 AM: --------------------------------------------------------------------- I've published a [PR|https://github.com/apache/flink/pull/15331] to make the JobID non-optional. [~kezhuw] could you take a look? was (Author: roman_khachatryan): I've published a PR to make the JobID non-optional. [~kezhuw] could you take a look? > 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 > Labels: pull-request-available > 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)