Search before asking
What happened
The dolphinscheduler-datasource-aliyunserverlessspark plugin declares emr_serverless_spark20230808:1.0.0, while dolphinscheduler-task-aliyunserverlessspark declares version 2.4.1.
At runtime, both plugins are loaded as shade jars. Due to classpath ordering (datasource-plugins/ directory comes before task-plugins/), the JVM loads com.aliyun.emr_serverless_spark20230808.Client from the datasource shade jar (version 1.0.0). This version does not contain the getTemplate() method that the task plugin code calls, resulting in NoSuchMethodError at runtime.
What you expected to happen
The datasource plugin should use the same emr_serverless_spark20230808 SDK version (2.4.1) as the task plugin, so no class loading conflicts occur.
Error log:
java.lang.NoSuchMethodError: com.aliyun.emr_serverless_spark20230808.Client.getTemplate(Ljava/lang/String;Lcom/aliyun/emr_serverless_spark20230808/models/GetTemplateRequest;)Lcom/aliyun/emr_serverless_spark20230808/models/GetTemplateResponse;
How to reproduce
- Deploy DolphinScheduler (standalone or cluster mode)
-
- Install both
dolphinscheduler-datasource-aliyunserverlessspark and dolphinscheduler-task-aliyunserverlessspark plugins
-
- Create an AliyunServerlessSpark datasource connection
-
- Submit an AliyunServerlessSpark task
-
- The task fails with NoSuchMethodError: Client.getTemplate()
Root cause is in dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-aliyunserverlessspark/pom.xml:
- Current: emr_serverless_spark20230808 version 1.0.0
-
- Should be: emr_serverless_spark20230808 version 2.4.1 (same as task plugin)
Anything else
This bug occurs every time when using the AliyunServerlessSpark task plugin. The fix is straightforward: upgrade the EMR SDK version in the datasource plugin pom.xml from 1.0.0 to 2.4.1.
Version
dev
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
The
dolphinscheduler-datasource-aliyunserverlesssparkplugin declaresemr_serverless_spark20230808:1.0.0, whiledolphinscheduler-task-aliyunserverlesssparkdeclares version2.4.1.At runtime, both plugins are loaded as shade jars. Due to classpath ordering (
datasource-plugins/directory comes beforetask-plugins/), the JVM loadscom.aliyun.emr_serverless_spark20230808.Clientfrom the datasource shade jar (version 1.0.0). This version does not contain thegetTemplate()method that the task plugin code calls, resulting inNoSuchMethodErrorat runtime.What you expected to happen
The datasource plugin should use the same
emr_serverless_spark20230808SDK version (2.4.1) as the task plugin, so no class loading conflicts occur.Error log:
java.lang.NoSuchMethodError: com.aliyun.emr_serverless_spark20230808.Client.getTemplate(Ljava/lang/String;Lcom/aliyun/emr_serverless_spark20230808/models/GetTemplateRequest;)Lcom/aliyun/emr_serverless_spark20230808/models/GetTemplateResponse;
How to reproduce
dolphinscheduler-datasource-aliyunserverlesssparkanddolphinscheduler-task-aliyunserverlesssparkpluginsRoot cause is in dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-aliyunserverlessspark/pom.xml:
Anything else
This bug occurs every time when using the AliyunServerlessSpark task plugin. The fix is straightforward: upgrade the EMR SDK version in the datasource plugin pom.xml from 1.0.0 to 2.4.1.
Version
dev
Are you willing to submit PR?
Code of Conduct