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-31601][K8S] Fix spark.kubernetes.executor.podNamePrefix to work #28401

Closed
wants to merge 3 commits into from
Closed

[SPARK-31601][K8S] Fix spark.kubernetes.executor.podNamePrefix to work #28401

wants to merge 3 commits into from

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Apr 29, 2020

What changes were proposed in this pull request?

This PR aims to fix spark.kubernetes.executor.podNamePrefix to work.

Why are the changes needed?

Currently, the configuration is broken like the following.

bin/spark-submit \
--master k8s://$K8S_MASTER \
--deploy-mode cluster \
--name spark-pi \
--class org.apache.spark.examples.SparkPi \
-c spark.kubernetes.container.image=spark:pr \
-c spark.kubernetes.driver.pod.name=mypod \
-c spark.kubernetes.executor.podNamePrefix=mypod \
local:///opt/spark/examples/jars/spark-examples_2.12-3.1.0-SNAPSHOT.jar

BEFORE SPARK-31601

pod/mypod                              1/1     Running     0          9s
pod/spark-pi-7469dd71c499fafb-exec-1   1/1     Running     0          4s
pod/spark-pi-7469dd71c499fafb-exec-2   1/1     Running     0          4s

AFTER SPARK-31601

pod/mypod                              1/1     Running     0          8s
pod/mypod-exec-1                       1/1     Running     0          3s
pod/mypod-exec-2                       1/1     Running     0          3s

Does this PR introduce any user-facing change?

Yes. This is a bug fix. The conf will work as described in the documentation.

How was this patch tested?

Pass the Jenkins and run the above comment manually.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@ScrapCodes
Copy link
Member

ScrapCodes commented Apr 29, 2020

Hi @dongjoon-hyun , thanks for the fix !

  • Run SparkPi with no resources *** FAILED ***
    The code passed to eventually never returned normally. Attempted 130 times over 2.0021201478333333 minutes. Last failure message: false was not true. (KubernetesSuite.scala:370)

^^^ Seems to be a flaky test.

@ScrapCodes
Copy link
Member

retest

@SparkQA

This comment has been minimized.

@dongjoon-hyun
Copy link
Member Author

Thank you so much for review, @ScrapCodes .

@SparkQA
Copy link

SparkQA commented Apr 29, 2020

Test build #122073 has finished for PR 28401 at commit c1e181d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

This comment has been minimized.

@SparkQA

This comment has been minimized.

@dongjoon-hyun
Copy link
Member Author

Retest this please.

@SparkQA
Copy link

SparkQA commented Apr 29, 2020

Test build #122083 has finished for PR 28401 at commit c1e181d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 29, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/26758/

@dongjoon-hyun
Copy link
Member Author

cc @holdenk

@SparkQA
Copy link

SparkQA commented Apr 29, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/26758/

@dongjoon-hyun
Copy link
Member Author

Could you review this once more, @ScrapCodes ?

@ScrapCodes
Copy link
Member

Thanks ! @dongjoon-hyun , LGTM :)

@ScrapCodes
Copy link
Member

I wish we had a merge bot, which could detect a LGTM from a committer and do the need full.

@ScrapCodes
Copy link
Member

I am going to merge this into Master and branch-3.0.

@asfgit asfgit closed this in 85dad37 Apr 30, 2020
asfgit pushed a commit that referenced this pull request Apr 30, 2020
### What changes were proposed in this pull request?

This PR aims to fix `spark.kubernetes.executor.podNamePrefix` to work.

### Why are the changes needed?

Currently, the configuration is broken like the following.
```
bin/spark-submit \
--master k8s://$K8S_MASTER \
--deploy-mode cluster \
--name spark-pi \
--class org.apache.spark.examples.SparkPi \
-c spark.kubernetes.container.image=spark:pr \
-c spark.kubernetes.driver.pod.name=mypod \
-c spark.kubernetes.executor.podNamePrefix=mypod \
local:///opt/spark/examples/jars/spark-examples_2.12-3.1.0-SNAPSHOT.jar
```

**BEFORE SPARK-31601**
```
pod/mypod                              1/1     Running     0          9s
pod/spark-pi-7469dd71c499fafb-exec-1   1/1     Running     0          4s
pod/spark-pi-7469dd71c499fafb-exec-2   1/1     Running     0          4s
```

**AFTER SPARK-31601**
```
pod/mypod                              1/1     Running     0          8s
pod/mypod-exec-1                       1/1     Running     0          3s
pod/mypod-exec-2                       1/1     Running     0          3s
```

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

Yes. This is a bug fix. The conf will work as described in the documentation.

### How was this patch tested?

Pass the Jenkins and run the above comment manually.

Closes #28401 from dongjoon-hyun/SPARK-31601.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Prashant Sharma <prashsh1@in.ibm.com>
(cherry picked from commit 85dad37)
Signed-off-by: Prashant Sharma <prashsh1@in.ibm.com>
@dongjoon-hyun
Copy link
Member Author

Thank you for review and merging, @ScrapCodes .
Ya. Bot is popular in these days. :)

@dongjoon-hyun dongjoon-hyun deleted the SPARK-31601 branch April 30, 2020 04:50
dongjoon-hyun added a commit that referenced this pull request Apr 30, 2020
This PR aims to fix `spark.kubernetes.executor.podNamePrefix` to work.

Currently, the configuration is broken like the following.
```
bin/spark-submit \
--master k8s://$K8S_MASTER \
--deploy-mode cluster \
--name spark-pi \
--class org.apache.spark.examples.SparkPi \
-c spark.kubernetes.container.image=spark:pr \
-c spark.kubernetes.driver.pod.name=mypod \
-c spark.kubernetes.executor.podNamePrefix=mypod \
local:///opt/spark/examples/jars/spark-examples_2.12-3.1.0-SNAPSHOT.jar
```

**BEFORE SPARK-31601**
```
pod/mypod                              1/1     Running     0          9s
pod/spark-pi-7469dd71c499fafb-exec-1   1/1     Running     0          4s
pod/spark-pi-7469dd71c499fafb-exec-2   1/1     Running     0          4s
```

**AFTER SPARK-31601**
```
pod/mypod                              1/1     Running     0          8s
pod/mypod-exec-1                       1/1     Running     0          3s
pod/mypod-exec-2                       1/1     Running     0          3s
```

Yes. This is a bug fix. The conf will work as described in the documentation.

Pass the Jenkins and run the above comment manually.

Closes #28401 from dongjoon-hyun/SPARK-31601.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Prashant Sharma <prashsh1@in.ibm.com>
(cherry picked from commit 85dad37)
Signed-off-by: Prashant Sharma <prashsh1@in.ibm.com>
(cherry picked from commit 82b8f7f)
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun
Copy link
Member Author

Since the bug exists in branch-2.4, I cherry-pick this to branch-2.4, too.

cc @holdenk

@ScrapCodes
Copy link
Member

@dongjoon-hyun honestly, I was about to say that, thanks for doing it. :)

@dongjoon-hyun
Copy link
Member Author

:)

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.

3 participants