-
Notifications
You must be signed in to change notification settings - Fork 4.8k
[Feature-#15103][Standalone]Support using JDBC registry plugin in standalone mode. #15139
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
Conversation
@ruanwenjun I don't know how to add labels, I'm a bit confused. Can you help me ? |
You don't have permission to add label. |
@ruanwenjun Thank you so much! But I see that the check here is still not passed. Do you have to review it before it's approved? |
} | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a blank line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a blank line here.
Thanks for the tip! I haven't made a habit of using “mvn spotless: apply”
public static void main(String[] args) throws Exception { | ||
try { | ||
// We cannot use try-with-resources to close "TestingServer", since SpringApplication.run() will not block |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
I'm sorry I missed that. My idea is to move it to the “dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/registry/ZookeeperStandaloneRegistry.java”
...e-server/src/main/java/org/apache/dolphinscheduler/registry/ZookeeperStandaloneRegistry.java
Fixed
Show resolved
Hide resolved
…in standalone mode.(apache#15139)
…in standalone mode.(apache#15139)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #15139 +/- ##
============================================
- Coverage 38.23% 38.18% -0.06%
+ Complexity 4695 4679 -16
============================================
Files 1285 1285
Lines 45453 45453
Branches 4951 4951
============================================
- Hits 17381 17358 -23
- Misses 26181 26203 +22
- Partials 1891 1892 +1 ☔ View full report in Codecov by Sentry. |
…in standalone mode.(apache#15139) fix: Add a nested comment explaining why this method is empty.
@@ -34,7 +34,7 @@ | |||
@ConditionalOnProperty(prefix = "registry", name = "type", havingValue = "jdbc") | |||
public class JdbcRegistryConfiguration { | |||
|
|||
@Bean | |||
@Bean("sqlSessionFactory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a good idea add name 'sqlSessionFactory' for this bean, since this will cause the JdbcRegistry use the same sql session factory with the business.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a good idea add name 'sqlSessionFactory' for this bean, since this will cause the JdbcRegistry use the same sql session factory with the business.
Thank you for reminding me of this. I write this because I find that When I using JDBCRegistry plugin
,
if I don't explicitly declare 'sqlSessionFactory' , an exception will be thrown at startup:
dolphinscheduler-standalone.log
I think it might be because of 'DaoConfiguration. java 'references it
Is this a known problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ruanwenjun can you help me? What can I do to improve this feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't meet this problem, it can work well when I use JDBC registry
@Component | ||
public class JdbcStandaloneRegistry implements StandaloneRegistry { | ||
|
||
@Override | ||
public void init() { | ||
// The JDBC plugin will take effect via @ConditionalOnProperty. | ||
} | ||
|
||
@Override | ||
public boolean supports(String registryType) { | ||
return "jdbc".equalsIgnoreCase(registryType); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this? I hope we can only add a StandaloneZookeeperRegistry, in this class, we will start a TestingServer
, and user can still use zookeeper registry to connect their own zk cluster or use JDBC to connect their own db.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this? I hope we can only add a StandaloneZookeeperRegistry, in this class, we will start a
TestingServer
, and user can still use zookeeper registry to connect their own zk cluster or use JDBC to connect their own db.
Sure!
…in standalone mode.(apache#15139) fix: remove JdbcStandaloneRegistry
SonarCloud Quality Gate failed.
|
This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs. |
This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request. |
Purpose of the pull request
This pull request support using JDBC registry plugin in standalone mode. close #15103
Brief change log
Verify this pull request
This pull request is already covered by existing tests, such as (please describe tests).