2000liux opened a new issue, #3971:
URL: https://github.com/apache/incubator-seatunnel/issues/3971

   ### Search before asking
   
   - [X] I had searched in the 
[feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22)
 and found no similar feature requirement.
   
   
   ### Description
   
   ### Hello everyone, when I looked at the source code related to cdc, I found 
that there are some things that seem to be improved
   
   #### Question 1
   - When constructing MySql, SqlServer, and SourceConfig, some repeated string 
keys appear directly in the code 
   - Is it possible to extract these same operations involved in building 
Properties into public methods, each class only needs to handle different 
content separately?
   - Make other JdbcSourceConfigFactory subclass factory code simpler and more 
elegant.
   
   - Below is the existing code
     - mysql
   
![image](https://user-images.githubusercontent.com/42398474/212905406-f54a47bd-ae9e-4480-842c-3b8e250cafaa.png)
     - sqlServer
   
![image](https://user-images.githubusercontent.com/42398474/212905464-fbb6a6d6-b38f-445d-804b-334c8ed133e6.png)
   
   #### Question 2
   - The JdbcSourceOptions class in the connector-cdc-base module is a public 
options class, and the PORT field attribute defaults to 3306. This port is only 
used by mysql, and other databases may have some hidden dangers when using this 
key.
   
   
![image](https://user-images.githubusercontent.com/42398474/212906209-ef988063-c7da-417e-bf23-62caae352028.png)
   
   #### Question 3
   - I found that there may be inelegant writing in the code of some options
      - For example
   
![image](https://user-images.githubusercontent.com/42398474/212907030-c9d320de-95d9-45ce-b780-5a42b0e2a408.png)
   
![image](https://user-images.githubusercontent.com/42398474/212907131-858de6db-fa62-4b97-9640-0f27fd81d189.png)
   
![image](https://user-images.githubusercontent.com/42398474/212907768-4a72fa60-e356-4312-8b4a-52d81def7dd9.png)
   
   ---
   #### Remarks
   - I have carefully read the source code of flink, and some excellent codes 
related to options and configuration of flink can simplify integration into the 
seatunnel project.
   - Hope to join this project and submit an issue for the first time. Hope my 
suggestion can make the seatunnel part code more elegant.
   - If my suggestion is effective, please assign me this task。
   - Can you leave valuable suggestions on this issue, which will enable me to 
integrate into the seatunel project more quickly。Tasnks  [How to join this 
project](https://github.com/apache/incubator-seatunnel/discussions/397)
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to