Skip to content

Commit

Permalink
[SPARK-33874][K8S][FOLLOWUP] Handle long lived sidecars - clean up lo…
Browse files Browse the repository at this point in the history
…gging

### What changes were proposed in this pull request?

Switch log level from warn to debug when the spark container is not present in the pod's container statuses.

### Why are the changes needed?

There are many non-critical situations where the Spark container may not be present, and the warning log level is too high.

### Does this PR introduce _any_ user-facing change?

Log message change.

### How was this patch tested?

N/A

Closes apache#31047 from holdenk/SPARK-33874-follow-up.

Authored-by: Holden Karau <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
holdenk authored and dongjoon-hyun committed Jan 5, 2021
1 parent cc1d9d2 commit 171db85
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ object ExecutorPodsSnapshot extends Logging {
case _ =>
PodRunning(pod)
}
// If we can't find the Spark container status, fall back to the pod status
// If we can't find the Spark container status, fall back to the pod status. This is
// expected to occur during pod startup and other situations.
case _ =>
logWarning(s"Unable to find container ${sparkContainerName} in pod ${pod} " +
logDebug(s"Unable to find container ${sparkContainerName} in pod ${pod} " +
"defaulting to entire pod status (running).")
PodRunning(pod)
}
Expand Down

0 comments on commit 171db85

Please sign in to comment.