Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-9467] add DAMENG DataSource #12860

Merged
merged 24 commits into from
Jan 4, 2023
Merged

Conversation

lenian
Copy link
Contributor

@lenian lenian commented Nov 10, 2022

Purpose of the pull request

Brief change log

Verify this pull request

#9467

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@lenian lenian closed this Nov 10, 2022
@lenian lenian reopened this Nov 10, 2022
Comment on lines 28 to 29
+ ", password='" + password + '\''
+ ", address='" + address + '\''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, remove password in toString() should be better, this prevents the password from being printed to the log file. WDYT.

Copy link
Contributor Author

@lenian lenian Nov 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toString() method of the OracleConnectionParamMySQLConnectionParam class has the password attribute printed.I modified it according to the mysql and oracle specifications。Now I need to remove password in toString()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toString() method of the OracleConnectionParamMySQLConnectionParam class has the password attribute printed.I modified it according to the mysql and oracle specifications。Now I need to remove password in toString()?

Please remove all password in those classes, also, consider use lombok ToString(excludes = to simplify the codes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll remove password in toString()

Comment on lines 28 to 29
+ ", password='" + password + '\''
+ ", address='" + address + '\''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toString() method of the OracleConnectionParamMySQLConnectionParam class has the password attribute printed.I modified it according to the mysql and oracle specifications。Now I need to remove password in toString()?

Please remove all password in those classes, also, consider use lombok ToString(excludes = to simplify the codes

dolphinscheduler-bom/pom.xml Outdated Show resolved Hide resolved
@lenian lenian closed this Nov 12, 2022
@lenian lenian requested a review from SbloodyS November 30, 2022 04:27
@davidzollo
Copy link
Contributor

good job
Please use dameng instead of dm, nobody knows what dm means
Please add license file refer to this doc, https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/contribute/join/DS-License.html

@lenian
Copy link
Contributor Author

lenian commented Dec 6, 2022

good job Please use dameng instead of dm, nobody knows what dm means Please add license file refer to this doc, https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/contribute/join/DS-License.html
I will improve it according to your suggestion

lenian added 2 commits December 7, 2022 09:35
1、modification package dm->dameng;
2、add Dameng DmJdbcDriver18 License
@davidzollo davidzollo removed the Waiting for user feedback Waiting for feedback from issue/PR author label Dec 8, 2022
String address = connectionParams.getAddress();
String[] hostSeperator = address.split(Constants.DOUBLE_SLASH);
String[] hostPortArray = hostSeperator[hostSeperator.length - 1].split(Constants.COMMA);
damengDatasourceParamDTO.setPort(Integer.parseInt(hostPortArray[0].split(Constants.COLON)[1]));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
# Conflicts:
#	dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-all/pom.xml
#	dolphinscheduler-datasource-plugin/pom.xml
#	dolphinscheduler-dist/release-docs/LICENSE
#	dolphinscheduler-spi/src/main/java/org/apache/dolphinscheduler/spi/enums/DbType.java
#	dolphinscheduler-ui/src/service/modules/data-source/types.ts
#	dolphinscheduler-ui/src/views/datasource/list/use-form.ts
#	dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-datasource.ts
#	tools/dependencies/known-dependencies.txt
Comment on lines 145 to 149
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
</dependency>
</dependencies>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you introducing a new database connection pool? we already have HikariCP.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HikariCP does not support Dameng, druid supports Dameng

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand, it's just a data source connector management, why doesn't it support dm, can you explain why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks,I just tested the DaMeng database with HikariCP,HikariCP supports DaMeng

damengConnectionParam.setDriverClassName(getDatasourceDriver());
damengConnectionParam.setValidationQuery(getValidationQuery());
damengConnectionParam.setOther(transformOther(dmDatasourceParam.getOther()));
damengConnectionParam.setProps(dmDatasourceParam.getOther());
Copy link
Member

@ruanwenjun ruanwenjun Dec 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use setProps, I remember we don't have props in BaseDataSourceParamDTO, you need to rebase the upstream code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have rebase BaseDataSourceParamDTO

Tianqi-Dotes
Tianqi-Dotes previously approved these changes Jan 4, 2023
Copy link
Member

@Tianqi-Dotes Tianqi-Dotes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanx for the efforts.

@@ -141,5 +141,6 @@
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unnessnary change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll remove the unnecessary changes right away

Tianqi-Dotes
Tianqi-Dotes previously approved these changes Jan 4, 2023
@Tianqi-Dotes Tianqi-Dotes changed the title [Feature-9467] add DM DataSource [Feature-9467] add DAMENG DataSource Jan 4, 2023
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@sonarcloud
Copy link

sonarcloud bot commented Jan 4, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

48.6% 48.6% Coverage
0.0% 0.0% Duplication

@Tianqi-Dotes Tianqi-Dotes merged commit bcf03ad into apache:dev Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version backend document feature new feature first time contributor First-time contributor UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet