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

Guocheng Zhang commented on INLONG-605:
---------------------------------------

[~RocMarshal] :

The two implementation schemes have their own advantages and disadvantages, but 
your proposal can reduce a lot of implementation work: the configuration design 
of Flink is similar to Kafka, the configure can be set/get by the special key, 
the advantage is that you can write very little code to complete the expansion 
of the parameters; the disadvantage is that the user needs to known the macro 
definition of the corresponding parameter key. The current configuration design 
of TubeMQ is provides the setting method of a specific parameter, and the 
internal implementation is to encode specific parameters one by one, the 
advantage is that the user does not need to memorize the macro of the 
corresponding parameter key, and no worry about filling a incorrectly parameter 
key. The disadvantage is that coding method by method, the implementation 
workload is large and not concise enough.

 

I agree with you very much, and I think you also need to consider 2 points 
while you are considering adjusting the configuration framework:

1. I hope that the coding framework is an improved coding implementation, not 
directly quoting the codes of external components, to avoid bloating the 
project LICENSE and NOTICE due to too many external code references directly;

2. It is necessary to consider the compatibility of the configure interface, 
especially the configuration interface of the client's SDK, to avoid the 
incompatibility of the business that has been used the SDKs

 

Thanks again [~RocMarshal]

> Refactor the INLONG configuration framework
> -------------------------------------------
>
>                 Key: INLONG-605
>                 URL: https://issues.apache.org/jira/browse/INLONG-605
>             Project: Apache InLong
>          Issue Type: Improvement
>          Components: Broker, Client, Master, Server
>            Reporter: Roc Marshal
>            Assignee: Roc Marshal
>            Priority: Major
>              Labels: patch
>
> # Reconstruct it according to the [Flink configuration 
> module|https://github.com/apache/flink/tree/master/flink-core/src/main/java/org/apache/flink/configuration]
>  format to make improvements for codes quality, such as these core classes 
>  
> [ConfigConstants.java|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java]
>  
> [ConfigOption.java|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java]
>  
> [ConfigOptions.java|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/ConfigOptions.java]
>  
> [Configuration.java|https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/Configuration.java]
>  etc.
>  # Classes that might need to be refactored:
>  
> [BrokerConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-server/src/main/java/org/apache/tubemq/server/broker/BrokerConfig.java]
>  
>  
> [AbstractFileConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-server/src/main/java/org/apache/tubemq/server/common/fileconfig/AbstractFileConfig.java]
>  
> [TLSConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-core/src/main/java/org/apache/tubemq/corebase/config/TLSConfig.java]
>  
> [TubeClientConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-client/src/main/java/org/apache/tubemq/client/config/TubeClientConfig.java]
>  
> [ConsumerConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-client/src/main/java/org/apache/tubemq/client/config/ConsumerConfig.java]
>  
> [TubeClientConfigUtils.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-client/src/main/java/org/apache/tubemq/client/config/TubeClientConfigUtils.java]
>  
> [MasterReplicationConfig.java|http://https//github.com/apache/incubator-inlong/blob/master/tubemq-server/src/main/java/org/apache/tubemq/server/common/fileconfig/MasterReplicationConfig.java]
>  
> [RpcConfig.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-core/src/main/java/org/apache/tubemq/corerpc/RpcConfig.java]
>  
> [RpcConstants.java|https://github.com/apache/incubator-inlong/blob/master/tubemq-core/src/main/java/org/apache/tubemq/corerpc/RpcConstants.java]
>  # Group these configuration items based on their component 
> roles.Master,Broker,Client..



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

Reply via email to