Kezhu Wang created FLINK-21626:
----------------------------------
Summary: 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
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)