yangwwei commented on a change in pull request #34319:
URL: https://github.com/apache/spark/pull/34319#discussion_r732055721
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -456,11 +456,11 @@ class ExecutorPodsAllocator(
private def isExecutorIdleTimedOut(state: ExecutorPodState, currentTime:
Long): Boolean = {
try {
- val startTime =
Instant.parse(state.pod.getStatus.getStartTime).toEpochMilli()
+ val startTime =
Instant.parse(state.pod.getMetadata.getCreationTimestamp).toEpochMilli()
currentTime - startTime > executorIdleTimeout
} catch {
- case _: Exception =>
- logDebug(s"Cannot get startTime of pod ${state.pod}")
+ case e: Exception =>
+ logError(s"Cannot get the createTime of the pod $state.pod", e)
Review comment:
Updated, also updated the PR description
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -456,11 +456,11 @@ class ExecutorPodsAllocator(
private def isExecutorIdleTimedOut(state: ExecutorPodState, currentTime:
Long): Boolean = {
try {
- val startTime =
Instant.parse(state.pod.getStatus.getStartTime).toEpochMilli()
+ val startTime =
Instant.parse(state.pod.getMetadata.getCreationTimestamp).toEpochMilli()
currentTime - startTime > executorIdleTimeout
} catch {
- case _: Exception =>
- logDebug(s"Cannot get startTime of pod ${state.pod}")
+ case e: Exception =>
+ logError(s"Cannot get the createTime of the pod $state.pod", e)
Review comment:
Updated, thanks!
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]