zhilinli123 commented on code in PR #6435:
URL: https://github.com/apache/seatunnel/pull/6435#discussion_r1512241395
##########
seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java:
##########
@@ -195,7 +198,30 @@ private List<Path> getConnectorJarDependencies() {
/** build final spark-submit commands */
protected List<String> buildFinal() {
List<String> commands = new ArrayList<>();
- commands.add("${SPARK_HOME}/bin/spark-submit");
+ String local_os_type="";
+
+ SystemUtil my_system_util=new SystemUtil();
+ local_os_type=my_system_util.GetOsType();
+ // debug
+ // System.out.println("OS type:"+local_os_type);
+
+ String cmd_spark="";
+
+ if (local_os_type.toLowerCase().equals("windows")) {
+ cmd_spark="%SPARK_HOME%/bin/spark-submit.cmd";
+ } else if (local_os_type.toLowerCase().equals("linux")) {
+ cmd_spark="${SPARK_HOME}/bin/spark-submit";
+ } else if (local_os_type.toLowerCase().equals("unknown")) {
+ cmd_spark="error";
+ }
Review Comment:
ditto
--
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]