File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
launcher/src/main/java/org/apache/spark/launcher Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,12 @@ public synchronized void disconnect() {
49
49
50
50
/**
51
51
* Parses the logs of {@code spark-submit} and returns the last exception thrown.
52
- *
53
52
* <p>
54
- * Since {@link SparkLauncher} runs {@code spark-submit} in a sub-process, its difficult to
55
- * accurately retrieve the full {@link Throwable} from the {@code spark-submit} process.
56
- * This method parses the logs of the sub-process and provides a best-effort attempt at
57
- * returning the last exception thrown by the {@code spark-submit} process. Only the exception
58
- * message is parsed, the associated stacktrace is meaningless.
59
- * </p>
53
+ * Since {@link SparkLauncher} runs {@code spark-submit} in a sub-process, it's difficult to
54
+ * accurately retrieve the full {@link Throwable} from the {@code spark-submit} process.
55
+ * This method parses the logs of the sub-process and provides a best-effort attempt at
56
+ * returning the last exception thrown by the {@code spark-submit} process. Only the exception
57
+ * message is parsed, the associated stacktrace is meaningless.
60
58
*
61
59
* @return an {@link Optional} containing a {@link RuntimeException} with the parsed
62
60
* exception, otherwise returns a {@link Optional#EMPTY}
Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ private void redirect() {
62
62
while ((line = reader .readLine ()) != null ) {
63
63
if (active ) {
64
64
sink .info (line .replaceFirst ("\\ s*$" , "" ));
65
- if (error == null && containsIgnoreCase (line , "Error" ) || containsIgnoreCase (line ,
66
- "Exception" )) {
65
+ if (containsIgnoreCase (line , "Error" ) || containsIgnoreCase (line , "Exception" )) {
67
66
error = new RuntimeException (line );
68
67
}
69
68
}
You can’t perform that action at this time.
0 commit comments