FlinkShellSubmitAssist { public static int syncExecShellCommand(String command) throws IOException, InterruptedException { ProcessBuilder processBuilder = new ProcessBuilder(); processBuilder.command("/bin/sh", "-c", command); Process process = processBuilder.start(); return process.waitFor(); } FlinkShellSubmitAssist(FlinkShellCommandBuilder flinkShellCommandBuilder, String appIdRegex); String submitJob(JobInstanceDTO jobInstanceDTO, String logFile); static int syncExecShellCommand(String command);  }
@Test public void asyncExecShellCommand() throws IOException, InterruptedException { if (SystemUtil.isUnix()) { int exitCode = FlinkShellSubmitAssist.syncExecShellCommand("echo hello plink"); assert exitCode == 0; } }