Skip to content

Detect Spark driver completion by container state when tracking via k8s API#68048

Open
karenbraganz wants to merge 2 commits into
apache:mainfrom
karenbraganz:spark-container-status
Open

Detect Spark driver completion by container state when tracking via k8s API#68048
karenbraganz wants to merge 2 commits into
apache:mainfrom
karenbraganz:spark-container-status

Conversation

@karenbraganz
Copy link
Copy Markdown
Collaborator

@karenbraganz karenbraganz commented Jun 5, 2026

This PR tracks Spark job completion by container state instead of pod phase when track_driver_via_k8s_api=True. Sometimes the pod continues to run even after the driver container completes due to other sidecar containers. This PR makes driver completion detection more accurate by examining the container itself.

@karenbraganz
Copy link
Copy Markdown
Collaborator Author

I still need to test this out and write unit tests.

I was also thinking of moving the code to find the pod and container names out of the while loop that is run during every poll. I think it should be enough to get the names once instead of redundantly querying the API to get the names each time. Does this make sense to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

For spark operator with track_driver_via_k8s_api, detect driver completion by container status rather than pod phase

1 participant