[ 
https://issues.apache.org/jira/browse/FLINK-34406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yisha zhou updated FLINK-34406:
-------------------------------
          Component/s: Table SQL / API
        Fix Version/s: 1.19.0
    Affects Version/s: 1.19.0
          Description: 
When I implement a LookupFunction and utilize a RateLimiter in it, I need to 
open the RateLimiter in the open function. And I can only get a FunctionContext 
in the function. 

However the RateLimiter needs to call getNumberOfParallelSubtasks of 
RuntimeContext to get the parallelism of the job, so that it can calculate the 
flow limitation for each subtask.

Actually, getMetricGroup, getUserCodeClassLoader and so many FunctionContext 
functionalities all come from RuntimeContext. Why not just expose the 
RuntimeContext here?

> Expose RuntimeContext in FunctionContext
> ----------------------------------------
>
>                 Key: FLINK-34406
>                 URL: https://issues.apache.org/jira/browse/FLINK-34406
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / API
>    Affects Versions: 1.19.0
>            Reporter: yisha zhou
>            Priority: Major
>             Fix For: 1.19.0
>
>
> When I implement a LookupFunction and utilize a RateLimiter in it, I need to 
> open the RateLimiter in the open function. And I can only get a 
> FunctionContext in the function. 
> However the RateLimiter needs to call getNumberOfParallelSubtasks of 
> RuntimeContext to get the parallelism of the job, so that it can calculate 
> the flow limitation for each subtask.
> Actually, getMetricGroup, getUserCodeClassLoader and so many FunctionContext 
> functionalities all come from RuntimeContext. Why not just expose the 
> RuntimeContext here?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to