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

yisha zhou commented on FLINK-34406:
------------------------------------

Hi [~twalthr] ,  what do you think about this proposal?  I found that most of 
RuntimeContext functionalities in FunctionContext are introduced by you in 
https://issues.apache.org/jira/browse/FLINK-22857. 

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