-
Notifications
You must be signed in to change notification settings - Fork 5k
fix: data quality can not use #15551
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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #15551 +/- ##
============================================
- Coverage 38.41% 38.37% -0.04%
+ Complexity 4751 4745 -6
============================================
Files 1305 1305
Lines 44815 44841 +26
Branches 4800 4808 +8
============================================
- Hits 17214 17209 -5
- Misses 25731 25759 +28
- Partials 1870 1873 +3 ☔ View full report in Codecov by Sentry. |
| // not standalone mode | ||
| String currentAbsolutePath = new ClassPathResource("./").getFile().getAbsolutePath(); | ||
| String currentLibPath = currentAbsolutePath + "/../libs"; | ||
| getDataQualityJarPathFromPath(currentLibPath).ifPresent(jarName -> DEFAULT_DATA_QUALITY_JAR_PATH = jarName); | ||
|
|
||
| // standalone mode |
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.
auto discovery data quality jar path for both standalone mode and not
| BaseConnectionParam baseConnectionParam = new DefaultConnectionParam(); | ||
| baseConnectionParam.setUser(hikariDataSource.getUsername()); | ||
| baseConnectionParam.setPassword(hikariDataSource.getPassword()); | ||
| baseConnectionParam.setDatabase(jdbcInfo.getDatabase()); | ||
| baseConnectionParam.setAddress(jdbcInfo.getAddress()); | ||
| baseConnectionParam.setJdbcUrl(jdbcInfo.getJdbcUrl()); | ||
| baseConnectionParam.setOther(jdbcInfo.getParams()); |
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.
key change for data quality task can not be use
| if (StringUtils.isNotEmpty(params)) { | ||
| Map<String, String> others = new HashMap<>(); | ||
| String[] paramList = params.split("&"); | ||
| for (String param : paramList) { | ||
| // handle bad params | ||
| if (StringUtils.isEmpty(param) || !param.contains(EQUAL_SIGN)) { | ||
| continue; | ||
| } | ||
| String[] kv = param.split(EQUAL_SIGN); | ||
| others.put(kv[0], kv[1]); | ||
| } | ||
| jdbcInfo.setParams(others); | ||
| } |
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.
parse metadata other param to avoid connect error
caishunfeng
left a comment
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.
LGTM, some NIP
| log.info( | ||
| "Can not get data quality jar from path {}, maybe service running in standalone mode, will try to find another path", | ||
| currentLibPath); | ||
| currentLibPath = currentAbsolutePath + "/../../worker-server/libs"; |
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 seems can not auto find in docker image?
Is it better to add env when use standalone mode?
...e-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/utils/CommonUtils.java
Show resolved
Hide resolved
rickchengx
left a comment
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.
LGTM
|
* fix: data quality can not use fix: #15468, #15249, #14858 --------- Co-authored-by: Rick Cheng <[email protected]> Co-authored-by: Eric Gao <[email protected]> (cherry picked from commit 8efaa9f)

fix: #15468, #15249, #14858