attilapiros commented on a change in pull request #32436:
URL: https://github.com/apache/spark/pull/32436#discussion_r626243339
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsLifecycleManager.scala
##########
@@ -217,14 +217,42 @@ private[spark] class ExecutorPodsLifecycleManager(
ExecutorExited(exitCode, exitCausedByApp, exitMessage)
}
+ // A utility function to try and help people figure out whats gone wrong
faster.
+ private def describeExitCode(code: Int): String = {
Review comment:
What about moving this into `object ExecutorPodsLifecycleManager` and
making it accessible for the `ExecutorPodsLifecycleManagerSuite` to avoid the
copy-paste?
##########
File path: core/src/main/resources/org/apache/spark/ui/static/executorspage.js
##########
@@ -25,6 +25,14 @@ function getThreadDumpEnabled() {
return threadDumpEnabled;
}
+function formatLossReason(status, type, row) {
Review comment:
I see how you came up with the function arguments :)
The first argument must be the data which is selected from the whole REST
response by the `data` field:
https://github.com/apache/spark/blob/433ee83861a0a3aa7aea3c05d02fc9e70579ce76/core/src/main/resources/org/apache/spark/ui/static/executorspage.js#L548
So please rename`status` to `removeReason` as we should format remove
reasons.
And I guess its value was always `null`. This is why you used the `row` to
access it. The root cause of this problem is the selection itself was wrong.
So instead of
```
data: 'executorLossReason',
```
it must be:
```
data: 'removeReason',
```
And after this you can use the `removeReason` argument of this
`formatLossReason` function to get the value.
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsLifecycleManager.scala
##########
@@ -217,14 +217,42 @@ private[spark] class ExecutorPodsLifecycleManager(
ExecutorExited(exitCode, exitCausedByApp, exitMessage)
}
+ // A utility function to try and help people figure out whats gone wrong
faster.
+ private def describeExitCode(code: Int): String = {
+ val humanStr = code match {
+ case 0 => "(success)"
+ case 1 => "(generic, look at logs to clarify)"
+ case 42 => "(douglas adams)"
Review comment:
😆
Nit: (douglas adams) => (Douglas Adams) especially as Uncaught is
capitalised in "(Uncaught exception)".
And the latter is more like villain in our story not a hero :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]