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

Greg Harris commented on KAFKA-16884:
-------------------------------------

I don't think the builder pattern is a good fit for configuration classes like 
this one, it would be a deviation in form from all other config classes.

I see two odd things about the RLMC that may contribute to this: it doesn't 
extend AbstractConfig, it instead accepts one as an argument. It exposes it's 
(mutable!) CONFIG_DEF to be defined directly in the KafkaConfig. I have not 
seen that before, it's very unusual, and mutable ConfigDefs have been phased 
out in Connect.

If the large constructor is truly a problem (which i'm not convinced of, as 
there are only 2 call-sites for it right now) then I think it would be 
reasonable to solve it by bringing the whole class into alignment with other 
Config classes, rather than switching to the builder pattern.

> Refactor RemoteLogManagerConfig with a Builder
> ----------------------------------------------
>
>                 Key: KAFKA-16884
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16884
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Muralidhar Basani
>            Assignee: Muralidhar Basani
>            Priority: Minor
>
> The {{RemoteLogManagerConfig}} class has a very large constructor with 27 
> fields, making it difficult to read and work with. Introducing a builder 
> class would be beneficial.



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

Reply via email to