Skip to content

Commit a923fff

Browse files
author
dapeng
committed
添加addshipfile参数
1 parent baafc80 commit a923fff

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

core/src/main/java/com/dtstack/flink/sql/option/Options.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ public class Options {
7272
@OptionRequired(description = "log level")
7373
private String logLevel = "info";
7474

75+
@OptionRequired(description = "file add to ship file")
76+
private String addShipfile;
77+
78+
7579
public String getMode() {
7680
return mode;
7781
}
@@ -183,4 +187,13 @@ public String getLogLevel() {
183187
public void setLogLevel(String logLevel) {
184188
this.logLevel = logLevel;
185189
}
190+
191+
public String getAddShipfile() {
192+
return addShipfile;
193+
}
194+
195+
public void setAddShipfile(String addShipfile) {
196+
this.addShipfile = addShipfile;
197+
}
198+
186199
}

launcher/src/main/java/com/dtstack/flink/sql/launcher/perjob/PerJobClusterClientBuilder.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ public AbstractYarnClusterDescriptor createPerJobClusterDescriptor(String flinkJ
106106
} else {
107107
throw new RuntimeException("The Flink jar path is null");
108108
}
109+
// add user customized file to shipfile
110+
if (!StringUtils.isBlank(launcherOptions.getAddShipfile())) {
111+
List<String> paths = ConfigParseUtil.parsePathFromStr(launcherOptions.getAddShipfile());
112+
paths.forEach(path -> {
113+
shipFiles.add(new File(path));
114+
});
115+
}
109116
// classpath , all node need contain plugin jar
110117
String pluginLoadMode = launcherOptions.getPluginLoadMode();
111118
if (StringUtils.equalsIgnoreCase(pluginLoadMode, EPluginLoadMode.CLASSPATH.name())) {

0 commit comments

Comments
 (0)