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

Chesnay Schepler closed FLINK-18435.
------------------------------------
    Resolution: Fixed

master:
d2475f253cc55ae1cb3600e311f68de29bbd7c9d
3acb8f0d4eae4280b4422f1d6d6fb9239734a087
1.11:
1732b71b045b22375376864c5a8fab998dbaa428 
4daa859e2f3015cd81d11661dec3a11ed24e045d 

> Allow reporter factories to intercept reflection-based instantiation attempts
> -----------------------------------------------------------------------------
>
>                 Key: FLINK-18435
>                 URL: https://issues.apache.org/jira/browse/FLINK-18435
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Metrics
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>
> Before 1.11 to use a reporter its class was configured, and the instance 
> instantiated via reflection.
> We then introduced reporter factories, and added an annotation for 
> redirection instantiation attempts from the reporter class to factories, by 
> annotating the reporter class with {{InstantiateViaFactory}}.
> However, when we migrated reporters to plugins, this approach stopped 
> working, the reason being that it required the reporter class to be 
> accessible. The plugin system only exposes the factories however.
> To ensure that existing configurations continue to work, I propose to add a 
> new {{InterceptInstantiationViaReflection}} annotation for factories, with 
> which they can specify a class name to intercept reflection-based 
> instantiation attempts.
> Basically, we just invert the {{InstantiateViaFactory}} logic.
> Instead of the reporter saying "This factory should be used to instantiate 
> me.", the factory now say "I can instantiate that reporter."



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

Reply via email to