@@ -56,21 +56,36 @@ public SparkLauncher() {
56
56
this .pyFiles = new ArrayList <String >();
57
57
}
58
58
59
- /** Set the application name. */
59
+ /**
60
+ * Set the application name.
61
+ *
62
+ * @param appName Application name.
63
+ * @return This launcher.
64
+ */
60
65
public SparkLauncher setAppName (String appName ) {
61
66
checkNotNull (appName , "appName" );
62
67
this .appName = appName ;
63
68
return this ;
64
69
}
65
70
66
- /** Set the Spark master for the application. */
71
+ /**
72
+ * Set the Spark master for the application.
73
+ *
74
+ * @param master Spark master.
75
+ * @return This launcher.
76
+ */
67
77
public SparkLauncher setMaster (String master ) {
68
78
checkNotNull (master , "master" );
69
79
this .master = master ;
70
80
return this ;
71
81
}
72
82
73
- /** Set the deploy mode for the application. */
83
+ /**
84
+ * Set the deploy mode for the application.
85
+ *
86
+ * @param mode Deploy mode.
87
+ * @return This launcher.
88
+ */
74
89
public SparkLauncher setDeployMode (String mode ) {
75
90
checkNotNull (mode , "mode" );
76
91
this .deployMode = mode ;
@@ -80,21 +95,34 @@ public SparkLauncher setDeployMode(String mode) {
80
95
/**
81
96
* Set the main application resource. This should be the location of a jar file for Scala/Java
82
97
* applications, or a python script for PySpark applications.
98
+ *
99
+ * @param resource Path to the main application resource.
100
+ * @return This launcher.
83
101
*/
84
102
public SparkLauncher setAppResource (String resource ) {
85
103
checkNotNull (resource , "resource" );
86
104
this .appResource = resource ;
87
105
return this ;
88
106
}
89
107
90
- /** Sets the application class name for Java/Scala applications. */
108
+ /**
109
+ * Sets the application class name for Java/Scala applications.
110
+ *
111
+ * @param mainClass Application's main class.
112
+ * @return This launcher.
113
+ */
91
114
public SparkLauncher setMainClass (String mainClass ) {
92
115
checkNotNull (mainClass , "mainClass" );
93
116
this .mainClass = mainClass ;
94
117
return this ;
95
118
}
96
119
97
- /** Adds command line arguments for the application. */
120
+ /**
121
+ * Adds command line arguments for the application.
122
+ *
123
+ * @param args Arguments to pass to the application's main class.
124
+ * @return This launcher.
125
+ */
98
126
public SparkLauncher addAppArgs (String ... args ) {
99
127
for (String arg : args ) {
100
128
checkNotNull (arg , "arg" );
@@ -103,28 +131,48 @@ public SparkLauncher addAppArgs(String... args) {
103
131
return this ;
104
132
}
105
133
106
- /** Adds a jar file to be submitted with the application. */
134
+ /**
135
+ * Adds a jar file to be submitted with the application.
136
+ *
137
+ * @param jar Path to the jar file.
138
+ * @return This launcher.
139
+ */
107
140
public SparkLauncher addJar (String jar ) {
108
141
checkNotNull (jar , "jar" );
109
142
jars .add (jar );
110
143
return this ;
111
144
}
112
145
113
- /** Adds a file to be submitted with the application. */
146
+ /**
147
+ * Adds a file to be submitted with the application.
148
+ *
149
+ * @param file Path to the file.
150
+ * @return This launcher.
151
+ */
114
152
public SparkLauncher addFile (String file ) {
115
153
checkNotNull (file , "file" );
116
154
files .add (file );
117
155
return this ;
118
156
}
119
157
120
- /** Adds a python file / zip / egg to be submitted with the application. */
158
+ /**
159
+ * Adds a python file / zip / egg to be submitted with the application.
160
+ *
161
+ * @param file Path to the file.
162
+ * @return This launcher.
163
+ */
121
164
public SparkLauncher addPyFile (String file ) {
122
165
checkNotNull (file , "file" );
123
166
pyFiles .add (file );
124
167
return this ;
125
168
}
126
169
127
- /** Enables verbose reporting for SparkSubmit. */
170
+ /**
171
+ * Enables verbose reporting for SparkSubmit.
172
+ *
173
+ * @param verbose Whether to enable verbose output.
174
+ * @return This launcher.
175
+ */
128
176
public SparkLauncher setVerbose (boolean verbose ) {
129
177
this .verbose = verbose ;
130
178
return this ;
0 commit comments