Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-40763][K8S] Should expose driver service name to config for user features #38202

Closed
wants to merge 4 commits into from
Closed

[SPARK-40763][K8S] Should expose driver service name to config for user features #38202

wants to merge 4 commits into from

Conversation

zwangsheng
Copy link
Contributor

@zwangsheng zwangsheng commented Oct 11, 2022

What changes were proposed in this pull request?

Current on kubernetes, users use custom feature step can't perceive spark driver service name, which may generated by clock and uuid.

In some case, such as ingress, user need to know driver service name.

In this pr, we use configuration to pass it so that users are aware of it.

Of course, we want hear a better way of perceiving service name.

Why are the changes needed?

Does this PR introduce any user-facing change?

yes

How was this patch tested?

Local test

@zhengruifeng
Copy link
Contributor

@zwangsheng would you mind filing a ticket at first?

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@zwangsheng
Copy link
Contributor Author

@zwangsheng would you mind filing a ticket at first?

OK, will file jra ticket later.

@zwangsheng zwangsheng changed the title [K8S] Should expose driver service name to config for user features [SPARK-40763][K8S] Should expose driver service name to config for user features Oct 12, 2022
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test case please, @zwangsheng ?

@zwangsheng
Copy link
Contributor Author

Could you add a test case please, @zwangsheng ?

Thanks for your reminder, the corresponding unit test has been added.

@@ -50,6 +50,8 @@ private[spark] class DriverServiceFeatureStep(
s"$shorterServiceName as the driver service's name.")
shorterServiceName
}
// expose driver service name
kubernetesConf.sparkConf.set(RESOLVED_SPARK_DRIVER_SVC_NAME, resolvedServiceName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for update, @zwangsheng .

BTW, this proposal looks exceptional because we have been using kubernetesConf.sparkConf as read-only until now. Is there any other instance where Apache Spark use sparkConf like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that Apache Spark haven't tried to break this read-only rule elsewhere for kubernetesConf.sparkConf, so maybe we can try adding an additional variable to kubernetesConf for contextual passing.

I will make changes to the logic inside the PR to comply with the kubernetesConf.sparkConf read-only principle.

@zwangsheng
Copy link
Contributor Author

In order to maintain the KubernetesConf.SparkConf Read-Only, a lazy variable driverServiceName is added to KubernetesDriverConf, which is available to all FeatureSteps that can Access Kubernetes DriverConf.

And move generate driver serive name code block to KubernetesUtils

@zwangsheng
Copy link
Contributor Author

Gentle ping @dongjoon-hyun

Hi, modified the way to expose DriverServiceName for UserFeatureStep without intrusive changes to Spark Kubernetes Conf, please help to review it, happy to accept suggestions.

@github-actions
Copy link

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Jun 23, 2023
@github-actions github-actions bot closed this Jun 24, 2023
@melin
Copy link

melin commented Mar 6, 2024

cc @zwangsheng apache/kyuubi#6102

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.

5 participants