You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "pegasas (via GitHub)" <gi...@apache.org> on 2024/03/01 08:20:22 UTC
Re: [PR] [Improvement][Spark] Support Local Spark Cluster [dolphinscheduler]
pegasas commented on code in PR #15589:
URL: https://github.com/apache/dolphinscheduler/pull/15589#discussion_r1508641255
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-spark/src/test/java/org/apache/dolphinscheduler/plugin/task/spark/SparkTaskTest.java:
##########
@@ -41,20 +48,33 @@ public void testBuildCommandWithSparkSql() throws Exception {
Mockito.when(taskExecutionContext.getExecutePath()).thenReturn("/tmp");
Mockito.when(taskExecutionContext.getTaskAppId()).thenReturn("5536");
- SparkTask sparkTask = Mockito.spy(new SparkTask(taskExecutionContext));
- sparkTask.init();
- Assertions.assertEquals(
- "${SPARK_HOME}/bin/spark-sql " +
- "--master yarn " +
- "--deploy-mode client " +
- "--conf spark.driver.cores=1 " +
- "--conf spark.driver.memory=512M " +
- "--conf spark.executor.instances=2 " +
- "--conf spark.executor.cores=2 " +
- "--conf spark.executor.memory=1G " +
- "--name sparksql " +
- "-f /tmp/5536_node.sql",
- sparkTask.getScript());
+ ResourceContext resourceContext = Mockito.mock(ResourceContext.class);
Review Comment:
Sure. I will add more case.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org