Commit addcecb
committed
[SPARK-1516]Throw exception in yarn client instead of run system.exit directly.
All the changes is in the package of "org.apache.spark.deploy.yarn":
1) Throw IllegalArgumentException in ClinetArguments instead of exit directly.
2) In Client's main method, if exception is caught, it will exit with code 1, otherwise exit with code 0.
3) In YarnClientSchedulerBackend's start method, if IllegalArgumentException is caught, it will exit with code 1, otherwise throw that exception.
4) Fix some message typo in the Client.scala
After the fix, if user integrate the spark yarn client into their applications,
when the argument is wrong or the running is finished, the application won't be terminated.1 parent 706e38f commit addcecb
File tree
4 files changed
+63
-36
lines changed- yarn
- alpha/src/main/scala/org/apache/spark/deploy/yarn
- common/src/main/scala/org/apache/spark
- deploy/yarn
- scheduler/cluster
- stable/src/main/scala/org/apache/spark/deploy/yarn
4 files changed
+63
-36
lines changedLines changed: 22 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | | - | |
143 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
148 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
229 | 230 | | |
230 | 231 | | |
231 | 232 | | |
232 | | - | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
478 | | - | |
479 | 480 | | |
480 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
481 | 492 | | |
482 | 493 | | |
483 | 494 | | |
| |||
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
147 | | - | |
| 145 | + | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
| |||
Lines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| |||
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
133 | | - | |
| 132 | + | |
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
| |||
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
163 | | - | |
164 | | - | |
165 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | | - | |
248 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
| |||
489 | 492 | | |
490 | 493 | | |
491 | 494 | | |
492 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
493 | 504 | | |
494 | | - | |
| 505 | + | |
495 | 506 | | |
496 | 507 | | |
497 | 508 | | |
| |||
0 commit comments