panbingkun commented on code in PR #45849:
URL: https://github.com/apache/spark/pull/45849#discussion_r1549605462


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala:
##########
@@ -533,8 +533,10 @@ class ExecutorPodsAllocator(
       currentTime - creationTime > executorIdleTimeout
     } catch {
       case e: Exception =>
-        logError(log"Cannot get the creationTimestamp of the pod: " +
-          log"${MDC(LogKey.POD_ID, state.pod)}", e)
+        logError(log"Cannot get the creationTimestamp of the pod " +
+          log"${MDC(LogKey.KUBERNETES_POD_NAME, 
state.pod.getMetadata.getName)} in namespace " +
+          log"${MDC(LogKey.KUBERNETES_NAMESPACE, 
state.pod.getMetadata.getNamespace)}. " +
+          log"Resource details: ${state.pod}", e)

Review Comment:
   Pod
   ```
   public String toString() {
       return "Pod(apiVersion=" + this.getApiVersion() + ", kind=" + 
this.getKind() + ", metadata=" + this.getMetadata() + ", spec=" + 
this.getSpec() + ", status=" + this.getStatus() + ", additionalProperties=" + 
this.getAdditionalProperties() + ")";
     }
   ```
   
   ObjectMeta
   ```
   public String toString() {
       return "ObjectMeta(annotations=" + this.getAnnotations() + ", 
creationTimestamp=" + this.getCreationTimestamp() + ", 
deletionGracePeriodSeconds=" + this.getDeletionGracePeriodSeconds() + ", 
deletionTimestamp=" + this.getDeletionTimestamp() + ", finalizers=" + 
this.getFinalizers() + ", generateName=" + this.getGenerateName() + ", 
generation=" + this.getGeneration() + ", labels=" + this.getLabels() + ", 
managedFields=" + this.getManagedFields() + ", name=" + this.getName() + ", 
namespace=" + this.getNamespace() + ", ownerReferences=" + 
this.getOwnerReferences() + ", resourceVersion=" + this.getResourceVersion() + 
", selfLink=" + this.getSelfLink() + ", uid=" + this.getUid() + ", 
additionalProperties=" + this.getAdditionalProperties() + ")";
     }
   ```



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to