You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yun Gao (Jira)" <ji...@apache.org> on 2022/04/13 06:28:05 UTC

[jira] [Updated] (FLINK-24362) Consider reworking handlers to use composition

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

Yun Gao updated FLINK-24362:
----------------------------
    Fix Version/s: 1.16.0

> Consider reworking handlers to use composition
> ----------------------------------------------
>
>                 Key: FLINK-24362
>                 URL: https://issues.apache.org/jira/browse/FLINK-24362
>             Project: Flink
>          Issue Type: Technical Debt
>          Components: Runtime / REST
>            Reporter: Chesnay Schepler
>            Priority: Major
>             Fix For: 1.15.0, 1.16.0
>
>
> Rest handlers are currently a bit annoying to test because they are all implemented based on inheritance. This means that even if we just want to test the interactions between the handler and dispatcher we also setup the REST stack and as such for example need to provide messages headers.
> Related to that handlers are currently always working against subclasses of the RestfulGateway interface, which in _all_ cases provides a much larger API surface than a given handler actually requires, and there's no way to opt out of that. 
> I've created a prototype that would allow individual handlers to work with composition and furthermore work against subsets of the RestfulGateway interface.
> The conversion is not difficult and pretty much just busy work.
> https://github.com/zentol/flink/tree/_proto_handler_composition



--
This message was sent by Atlassian Jira
(v8.20.1#820001)