Browse Source

[fix-#11726] fix error when set connection proerty both in the URL and an argument (#15093)

Co-authored-by: zhangying14 <zhangying14@zuoyebang.com>
Co-authored-by: xiangzihao <460888207@qq.com>
3.2.1-prepare
izualzhy 1 year ago committed by GitHub
parent
commit
8665951981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java

9
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/src/main/java/org/apache/dolphinscheduler/plugin/datasource/presto/param/PrestoDataSourceProcessor.java

@ -102,10 +102,11 @@ public class PrestoDataSourceProcessor extends AbstractDataSourceProcessor {
@Override @Override
public String getJdbcUrl(ConnectionParam connectionParam) { public String getJdbcUrl(ConnectionParam connectionParam) {
PrestoConnectionParam prestoConnectionParam = (PrestoConnectionParam) connectionParam; PrestoConnectionParam prestoConnectionParam = (PrestoConnectionParam) connectionParam;
if (MapUtils.isNotEmpty(prestoConnectionParam.getOther())) { /**
return String.format("%s?%s", prestoConnectionParam.getJdbcUrl(), * return jdbc url without other parameters, avoid to assign same parameters both in URL and properties.
transformOther(prestoConnectionParam.getOther())); * or else got error msg: Connection property '...' is both in the URL and an argument
} * ref to <a href="https://prestodb.io/docs/current/installation/jdbc.html">Presto JDBC Driver</>
*/
return prestoConnectionParam.getJdbcUrl(); return prestoConnectionParam.getJdbcUrl();
} }

Loading…
Cancel
Save