File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 18
18
package org .apache .spark .deploy
19
19
20
20
import java .io .{File , PrintStream }
21
+ import java .lang .reflect .InvocationTargetException
21
22
import java .net .{URI , URL }
22
23
23
24
import scala .collection .mutable .{ArrayBuffer , HashMap , Map }
@@ -137,7 +138,7 @@ object SparkSubmit {
137
138
throw new Exception (msg)
138
139
}
139
140
}
140
-
141
+
141
142
// Special flag to avoid deprecation warnings at the client
142
143
sysProps(" SPARK_SUBMIT" ) = " true"
143
144
@@ -253,7 +254,12 @@ object SparkSubmit {
253
254
254
255
val mainClass = Class .forName(childMainClass, true , loader)
255
256
val mainMethod = mainClass.getMethod(" main" , new Array [String ](0 ).getClass)
256
- mainMethod.invoke(null , childArgs.toArray)
257
+ try {
258
+ mainMethod.invoke(null , childArgs.toArray)
259
+ } catch {
260
+ case e : InvocationTargetException =>
261
+ println(" Exception in Invoked Method" + e.getTargetException)
262
+ }
257
263
}
258
264
259
265
private def addJarToClasspath (localJar : String , loader : ExecutorURLClassLoader ) {
You can’t perform that action at this time.
0 commit comments