Skip to content

(Abandoned) Please go to #2970 PR.#2832

Closed
743294668 wants to merge 3 commits intoapache:devfrom
743294668:Thomas
Closed

(Abandoned) Please go to #2970 PR.#2832
743294668 wants to merge 3 commits intoapache:devfrom
743294668:Thomas

Conversation

@743294668
Copy link
Copy Markdown
Contributor

What is the purpose of the pull request

This pull request modify the JDBC format of the Oracle database connection.
Number:#2791.
pull/2792 ,pull/2818has been abandoned for other reasons.

The Oracle JDBC link I verified currently supports the following three methods:
jdbc:oracle:thin:@host:port:SID
jdbc:oracle:thin:@//host:port/service_name
jdbc:oracle:thin:@host:port/service_name
The above three methods are verified in the unit test.

Brief change log

DataSourceService.java:
Add Oracle link type parameter in buildParameter().
BaseDataSource.java:
Modify appendDatabase () method as a protected modifier to facilitate OracleDataSource to rewrite this method.
OracleDataSource.java:
Override appendDatabase () method.
OracleDataSourceTest.java:
Unit test the newly modified code.
DataSourceServiceTest.java:
Add buildParameter () unit test.
pom.xml:
added a line in the maven-surefire-plugin section of the pom file to ensure that my OracleDataSourceTest.java file can be executed, thus ensuring my code coverage.

Verify this pull request

This change added tests and can be verified as follows:

Add the Oracle data source in the data source center, including using the service name or SID.
Perform the task of executing the Oracle data source on the SQL type node and pass the verification.
##Addition

If anything is wrong, you are welcome to participate in the discussion. Thanks.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 28, 2020

Codecov Report

Merging #2832 into dev will increase coverage by 0.16%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #2832      +/-   ##
============================================
+ Coverage     37.19%   37.35%   +0.16%     
- Complexity     2559     2576      +17     
============================================
  Files           435      435              
  Lines         20020    20022       +2     
  Branches       2426     2425       -1     
============================================
+ Hits           7447     7480      +33     
+ Misses        11907    11858      -49     
- Partials        666      684      +18     
Impacted Files Coverage Δ Complexity Δ
...olphinscheduler/dao/datasource/BaseDataSource.java 50.00% <ø> (+50.00%) 15.00 <0.00> (+15.00)
...olphinscheduler/api/service/DataSourceService.java 7.27% <100.00%> (+5.05%) 5.00 <0.00> (+2.00)
...phinscheduler/dao/datasource/OracleDataSource.java 90.90% <100.00%> (+90.90%) 6.00 <2.00> (+6.00)
.../server/worker/processor/TaskExecuteProcessor.java 10.16% <0.00%> (-27.12%) 1.00% <0.00%> (-2.00%)
...nscheduler/server/entity/TaskExecutionContext.java 81.18% <0.00%> (-5.95%) 57.00% <0.00%> (-3.00%)
...e/dolphinscheduler/remote/NettyRemotingClient.java 51.07% <0.00%> (-2.88%) 9.00% <0.00%> (-2.00%)
...pache/dolphinscheduler/common/utils/FileUtils.java 28.97% <0.00%> (+0.93%) 9.00% <0.00%> (ø%)
...cheduler/server/registry/ZookeeperNodeManager.java 78.02% <0.00%> (+3.29%) 7.00% <0.00%> (+1.00%)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12c249a...06aca8e. Read the comment docs.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jun 5, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11.
Read more here

Copy link
Copy Markdown
Member

@gabry-lab gabry-lab left a comment

Choose a reason for hiding this comment

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

It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly

@743294668
Copy link
Copy Markdown
Contributor Author

It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly

At first I did getJdbcUrl modified, and then I noticed #2812 modification, I made changes based on this basis, and covered appendDatabase.
For now, do you want to rewrite getJdbcUrl instead? Any other suggestions? Looking forward for your response, thank you

@gabry-lab
Copy link
Copy Markdown
Member

It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly

At first I did getJdbcUrl modified, and then I noticed #2812 modification, I made changes based on this basis, and covered appendDatabase.
For now, do you want to rewrite getJdbcUrl instead? Any other suggestions? Looking forward for your response, thank you

Oh dev-1.3.0 branch the getJdbcUrl method removed, maybe we should invite @lgcareer to review this PR

@743294668
Copy link
Copy Markdown
Contributor Author

@lgcareer can you help review this? Thank you. Please explain if there is any problem.

@lgcareer
Copy link
Copy Markdown
Contributor

lgcareer commented Jun 8, 2020

@lgcareer can you help review this? Thank you. Please explain if there is any problem.

image

@lgcareer
Copy link
Copy Markdown
Contributor

lgcareer commented Jun 8, 2020

@lgcareer can you help review this? Thank you. Please explain if there is any problem.

You can test use "/" before sid,such as jdbc:oracle:thin:@//:1521/SID,I think we didn't must use ":" before sid.

@743294668
Copy link
Copy Markdown
Contributor Author

@lgcareer can you help review this? Thank you. Please explain if there is any problem.

You can test use "/" before sid,such as jdbc:oracle:thin:@//:1521/SID,I think we didn't must use ":" before sid.

Regarding the format of the URL, I am pretty sure that I will list it again. Before submitting this code, I used the local mode to run the API module test. Only the above three methods can pass. Regarding the question you mentioned, I conducted a query on Google again, and I did not find this way of using "/" to connect sid. It may be that the author's sid and service_name have the same name.
look forward to your reply. Thank you.

@lgcareer
Copy link
Copy Markdown
Contributor

lgcareer commented Jun 9, 2020

@lgcareer can you help review this? Thank you. Please explain if there is any problem.

You can test use "/" before sid,such as jdbc:oracle:thin:@//:1521/SID,I think we didn't must use ":" before sid.

Regarding the format of the URL, I am pretty sure that I will list it again. Before submitting this code, I used the local mode to run the API module test. Only the above three methods can pass. Regarding the question you mentioned, I conducted a query on Google again, and I did not find this way of using "/" to connect sid. It may be that the author's sid and service_name have the same name.
look forward to your reply. Thank you.

If you test it and it can't work successful,I think you can use your code instead of I said,May be you are right,The last time I test successful is that the service_name and SID is consistent.

@743294668
Copy link
Copy Markdown
Contributor Author

@gabrywu can you help review this? Thank you. Now I don’t know who I should check with, because I see that you did a requested changes.
Please explain if there is any problem.

Copy link
Copy Markdown
Contributor

@lgcareer lgcareer left a comment

Choose a reason for hiding this comment

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

+1

@743294668 743294668 requested a review from gabry-lab June 9, 2020 08:45
@743294668
Copy link
Copy Markdown
Contributor Author

It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly

lgcareer has reviewed the code, this method is no problem. The restriction also requires you to modify and review it, thank you

Copy link
Copy Markdown
Member

@gabry-lab gabry-lab left a comment

Choose a reason for hiding this comment

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

+1

@gabry-lab
Copy link
Copy Markdown
Member

gabry-lab commented Jun 11, 2020

It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly

lgcareer has reviewed the code, this method is no problem. The restriction also requires you to modify and review it, thank you

done. thanks for your contribution

Copy link
Copy Markdown
Contributor

@Jave-Chen Jave-Chen left a comment

Choose a reason for hiding this comment

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

+1

@gabry-lab
Copy link
Copy Markdown
Member

@743294668 Because the original branch of your repo , this PR can't be merged , so could you create another branch and PR to resolve this ?

@743294668
Copy link
Copy Markdown
Contributor Author

@743294668 Because the original branch of your repo , this PR can't be merged , so could you create another branch and PR to resolve this ?

Thanks for your reminder. I resubmitted a PR at #2970.

@743294668 743294668 changed the title Modify OracleDB connection string format. (Abandoned) Please go to #2970 PR. Jun 15, 2020
@gabry-lab
Copy link
Copy Markdown
Member

@743294668 Because the original branch of your repo , this PR can't be merged , so could you create another branch and PR to resolve this ?

Thanks for your reminder. I resubmitted a PR at #2970.

merged

@gabry-lab gabry-lab closed this Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants