zhongjiajie commented on code in PR #15551:
URL:
https://github.com/apache/dolphinscheduler/pull/15551#discussion_r1475476199
##########
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/utils/CommonUtils.java:
##########
@@ -123,14 +132,56 @@ public static boolean loadKerberosConf(String
javaSecurityKrb5Conf, String login
return false;
}
- public static String getDataQualityJarName() {
- String dqsJarName = PropertyUtils.getString(DATA_QUALITY_JAR_NAME);
+ public static String getDataQualityJarPath() {
+ String dqsJarPath = PropertyUtils.getString(DATA_QUALITY_JAR_NAME);
- if (StringUtils.isEmpty(dqsJarName)) {
- return "dolphinscheduler-data-quality.jar";
+ if (StringUtils.isEmpty(dqsJarPath)) {
+ log.info("data quality jar path is empty, will try to get it from
data quality jar name");
+ return getDefaultDataQualityJarPath();
}
- return dqsJarName;
+ return dqsJarPath;
+ }
+
+ private static String getDefaultDataQualityJarPath() {
+ if (StringUtils.isNotEmpty(DEFAULT_DATA_QUALITY_JAR_PATH)) {
Review Comment:
> It seems that if the location of the jar package has been found once before
correct
> Do we need to consider the situation where the user has modified the name
or location of the jar package
I think is ok to keep this, cause this jar is not in class path, They can
directly replace the jar with the same name if they rebuild the jar. Or if they
want to change de jar name, they should restart worker node, or change
`data-quality.jar.name`(actually a path) in `common.properties`
##########
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/utils/CommonUtils.java:
##########
@@ -123,14 +132,56 @@ public static boolean loadKerberosConf(String
javaSecurityKrb5Conf, String login
return false;
}
- public static String getDataQualityJarName() {
- String dqsJarName = PropertyUtils.getString(DATA_QUALITY_JAR_NAME);
+ public static String getDataQualityJarPath() {
+ String dqsJarPath = PropertyUtils.getString(DATA_QUALITY_JAR_NAME);
- if (StringUtils.isEmpty(dqsJarName)) {
- return "dolphinscheduler-data-quality.jar";
+ if (StringUtils.isEmpty(dqsJarPath)) {
+ log.info("data quality jar path is empty, will try to get it from
data quality jar name");
+ return getDefaultDataQualityJarPath();
}
- return dqsJarName;
+ return dqsJarPath;
+ }
+
+ private static String getDefaultDataQualityJarPath() {
+ if (StringUtils.isNotEmpty(DEFAULT_DATA_QUALITY_JAR_PATH)) {
Review Comment:
> It seems that if the location of the jar package has been found once before
correct
> Do we need to consider the situation where the user has modified the name
or location of the jar package
I think is ok to keep this, cause this jar is not in class path, They can
directly replace the jar with the same name if they rebuild the jar. Or if they
want to change de jar name, they should restart worker node, or change
`data-quality.jar.name`(actually a path) in `common.properties`
--
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]