zhilinli123 commented on code in PR #6435:
URL: https://github.com/apache/seatunnel/pull/6435#discussion_r1512241081
##########
seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/FlinkStarter.java:
##########
@@ -52,8 +55,33 @@ public static void main(String[] args) {
@Override
public List<String> buildCommands() {
List<String> command = new ArrayList<>();
+ 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_flink="";
+
+ // Nothe that "flink.cmd” or "flink.bat" can be retrieved from
lower version of flink (e.g. 1.0.9)
+ // We do not check if this file exists on the box, user needs
to make sure this file exists or not.
+ if (local_os_type.toLowerCase().equals("windows")) {
+ cmd_flink="%FLINK_HOME%/bin/flink.cmd";
+ } else if (local_os_type.toLowerCase().equals("linux")) {
+ cmd_flink="${FLINK_HOME}/bin/flink";
+ } else if (local_os_type.toLowerCase().equals("unknown")) {
+ cmd_flink="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]