Unverified Commit d4eaa775 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Fix] Fix execute jar npe (#3584)

parent 4013cfae
......@@ -90,12 +90,12 @@ public class ExecuteJarOperation extends AbstractOperation implements ExtendOper
Configuration configuration = tEnv.getConfig().getConfiguration();
File file =
Opt.ofBlankAble(submitParam.getUri()).map(URLUtils::toFile).orElse(null);
String submitArgs = Opt.ofBlankAble(submitParam.getArgs()).orElse("");
if (!PackagedProgramUtils.isPython(submitParam.getMainClass())) {
tEnv.addJar(file);
} else {
// python submit
submitParam.setArgs("--python " + file.getAbsolutePath() + " "
+ Opt.ofBlankAble(submitParam.getArgs()).orElse(""));
submitParam.setArgs("--python " + file.getAbsolutePath() + " " + submitArgs);
file = null;
}
......@@ -104,7 +104,7 @@ public class ExecuteJarOperation extends AbstractOperation implements ExtendOper
.setEntryPointClassName(submitParam.getMainClass())
.setConfiguration(configuration)
.setSavepointRestoreSettings(savepointRestoreSettings)
.setArguments(extractArgs(submitParam.getArgs().trim()).toArray(new String[0]))
.setArguments(extractArgs(submitArgs.trim()).toArray(new String[0]))
.setUserClassPaths(classpaths)
.build();
int parallelism = StrUtil.isNumeric(submitParam.getParallelism())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment