2222import java .util .Properties ;
2323
2424/**
25- * parse the original mission parameters
25+ * parse the original mission parameters
2626 * Date: 2020/3/4
2727 * Company: www.dtstack.com
28+ *
2829 * @author maqi
2930 */
3031public class JobParamsInfo {
3132
32- private String mode ;
33- private String name ;
34- private String queue ;
35- private String localPluginRoot ;
36- private String flinkConfDir ;
37- private String flinkJarPath ;
38- private String yarnConfDir ;
39- private String pluginLoadMode ;
40- private String udfJar ;
41- private String [] execArgs ;
42- private Properties confProperties ;
43- private Properties yarnSessionConfProperties ;
33+ private final String mode ;
34+ private final String name ;
35+ private final String queue ;
36+ private final String localPluginRoot ;
37+ private final String flinkConfDir ;
38+ private final String flinkJarPath ;
39+ private final String yarnConfDir ;
40+ private final String pluginLoadMode ;
41+ private final String udfJar ;
42+ private final String [] execArgs ;
43+ private final Properties confProperties ;
44+ private final Properties yarnSessionConfProperties ;
45+ private final String addShipFile ;
4446
4547 private JobParamsInfo (String mode , String name , String queue , String localPluginRoot , String flinkConfDir , String yarnConfDir ,
4648 String pluginLoadMode , String [] execArgs , Properties confProperties , Properties yarnSessionConfProperties ,
47- String udfJar , String flinkJarPath ) {
49+ String udfJar , String flinkJarPath , String addShipFile ) {
4850 this .mode = mode ;
4951 this .name = name ;
5052 this .queue = queue ;
@@ -57,6 +59,7 @@ private JobParamsInfo(String mode, String name, String queue, String localPlugin
5759 this .yarnSessionConfProperties = yarnSessionConfProperties ;
5860 this .udfJar = udfJar ;
5961 this .flinkJarPath = flinkJarPath ;
62+ this .addShipFile = addShipFile ;
6063 }
6164
6265 public String getMode () {
@@ -107,6 +110,10 @@ public String getFlinkJarPath() {
107110 return flinkJarPath ;
108111 }
109112
113+ public String getAddShipFile () {
114+ return addShipFile ;
115+ }
116+
110117 public static JobParamsInfo .Builder builder () {
111118 return new JobParamsInfo .Builder ();
112119 }
@@ -125,6 +132,7 @@ public static class Builder {
125132 private String udfJar ;
126133 private Properties confProperties ;
127134 private Properties yarnSessionConfProperties ;
135+ private String addShipfile ;
128136
129137 public JobParamsInfo .Builder setMode (String mode ) {
130138 this .mode = mode ;
@@ -186,9 +194,15 @@ public JobParamsInfo.Builder setFlinkJarPath(String flinkJarPath) {
186194 return this ;
187195 }
188196
197+ public JobParamsInfo .Builder setAddShipfile (String addShipfile ) {
198+ this .addShipfile = addShipfile ;
199+ return this ;
200+ }
201+
189202 public JobParamsInfo build () {
190203 return new JobParamsInfo (mode , name , queue , localPluginRoot , flinkConfDir ,
191- yarnConfDir , pluginLoadMode , execArgs , confProperties , yarnSessionConfProperties , udfJar , flinkJarPath );
204+ yarnConfDir , pluginLoadMode , execArgs , confProperties ,
205+ yarnSessionConfProperties , udfJar , flinkJarPath , addShipfile );
192206 }
193207 }
194208
@@ -207,6 +221,7 @@ public String toString() {
207221 ", execArgs=" + Arrays .toString (execArgs ) +
208222 ", confProperties=" + confProperties +
209223 ", yarnSessionConfProperties=" + yarnSessionConfProperties +
224+ ", addShipFile='" + addShipFile + '\'' +
210225 '}' ;
211226 }
212227}
0 commit comments