[Fix-10039] Flink run command when perfecting Python jobs (#10042)

* [fix] flink task

* [fix] flink task

(cherry picked from commit d643e1c1cf)
This commit is contained in:
Dannila 2022-05-16 15:06:21 +08:00 committed by Jiajie Zhong
parent ea284526f9
commit d74aa47196
2 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,7 @@ public class FlinkConstants {
public static final String FLINK_MAIN_CLASS = "-c";
public static final String FLINK_PARALLELISM = "-p";
public static final String FLINK_SHUTDOWN_ON_ATTACHED_EXIT = "-sae";
public static final String FLINK_PYTHON = "-py";
public static final String FLINK_FORMAT_EXECUTION_TARGET = "set execution.target=%s";
public static final String FLINK_FORMAT_YARN_APPLICATION_NAME = "set yarn.application.name=%s";

View File

@ -149,6 +149,10 @@ public class FlinkTask extends AbstractYarnTask {
ResourceInfo mainJar = flinkParameters.getMainJar();
if (mainJar != null) {
// -py
if(ProgramType.PYTHON == programType) {
args.add(FlinkConstants.FLINK_PYTHON);
}
args.add(mainJar.getRes());
}