Uh oh!
There was an error while loading. Please reload this page.
[SPARK-25442][SQL][K8S] Support STS to run in k8s deployments with spark deployment mode as cluster. - #22433
[SPARK-25442][SQL][K8S] Support STS to run in k8s deployments with spark deployment mode as cluster.#22433suryag10 wants to merge 11 commits into
Conversation
ifilonenko
commented
Sep 16, 2018
test this please |
SparkQA
commented
Sep 16, 2018
Kubernetes integration test starting |
SparkQA
commented
Sep 16, 2018
Kubernetes integration test status success |
dongjoon-hyun
commented
Sep 16, 2018
Thank you for your first contribution, @suryag10 .
And, just out of curious, do we need this change? - exec"${SPARK_HOME}"/sbin/spark-daemon.sh submit $CLASS 1 --name "Thrift JDBC/ODBC Server""$@"
+ exec"${SPARK_HOME}"/sbin/spark-daemon.sh submit $CLASS 1 --name "Thrift-JDBC-ODBC-Server""$@" |
suryag10
commented
Sep 16, 2018
Without the above change, it fails to start the driver pod as well. Spaces, "/" are not allowed for the "name" in the kubernetes world. |
mridulm
commented
Sep 16, 2018
Does it fail in k8s or does spark k8s code error out ? |
suryag10
commented
Sep 16, 2018
Following is the error seen without the fix: This is not specific to Kubernetes, but more of a generic DNS (DNS-1123) |
SparkQA
commented
Sep 16, 2018
Test build #96105 has finished for PR 22433 at commit
|
mridulm
commented
Sep 16, 2018
It is an implementation detail of k8s integration that application name is expected to be DNS compliant ... spark does not have that requirement; and yarn/mesos/standalone/local work without this restriction. |
suryag10
commented
Sep 16, 2018
As this script is common start point for all the resource managers(k8s/yarn/mesos/standalone/local), i guess changing this to fit for all the cases has a value add, instead of doing at each resource manager level. Thoughts? |
erikerlandson
commented
Sep 16, 2018
I'm wondering, is there some reason this isn't supported in cluster mode for yarn & mesos? Or put another way, what is the rationale for k8s being added as an exception to this rule? |
jacobdr
commented
Sep 16, 2018
Your changes to the name handling don’t comply with this, so agree with @mridulm you should move this change elsewhere and more broadly support name validation/sanitization for submitted applications in kubernetes |
mridulm
commented
Sep 16, 2018
Please note that I am specifically referring only to the need for changing application |
suryag10
commented
Sep 17, 2018
I donno the specific reason why this was not supported in yarn and mesos. The initial contributions to the spark on K8S started with cluster mode(with restriction for client mode). So this PR enhances such that STS can run in k8s deployments with spark cluster mode(In the latest spark code i had observed that the client mode also works(need to cross verify this once)). |
liyinan926
commented
Sep 17, 2018
Agreed with @mridulm that the naming restriction is specific to k8s and should be handled in a k8s specific way, e.g., somewhere around https://github.com/apache/spark/blob/master/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/submit/KubernetesClientApplication.scala#L208. |
suryag10
commented
Sep 18, 2018
Ok, Will update the PR with the same. |
suryag10
commented
Sep 19, 2018
Hi, Handling of this conversion is already present in I had reverted back the change in start-thriftserver.sh file. Please review and merge. |
suryag10
commented
Sep 19, 2018
@mridulm@liyinan926@jacobdr@ifilonenko I had reverted back the fix in start-thriftserver.sh. Please review and merge. |
nrchakradhar
commented
Sep 19, 2018
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
suryag10
commented
Sep 22, 2018
can somebody pls review and merge? |
Uh oh!
There was an error while loading. Please reload this page.
erikerlandson
commented
Oct 1, 2018
In the scenario of a cluster-mode submission, what is the command-line behavior? Does the thrift-server script "block" until the thrift server pod is shut down? |
erikerlandson
commented
Oct 1, 2018
If possible, there should be some basic integration testing. Run a thrift server command against the minishift cluster used by the other testing. |
suryag10
commented
Oct 22, 2018
STS is a server and its best way of deployment in K8S cluster is either done through the helm chart or through the yaml file(although it can be done through the method you had suggested, but i guess that scenario would be a rare case and there will be no HA of the STS server if it is triggered from outside). |
suryag10
commented
Oct 22, 2018
By default the script returns but can be made to block by setting the environment variable SPARK_NO_DAEMONIZE. Once this is done, script blocks until the thrift server pod is shut down |
suryag10
commented
Oct 22, 2018
Will add this a separate PR. |
suryag10
commented
Oct 22, 2018
Can some body pls merge this? |
suryag10
commented
Oct 22, 2018
I am observing some weird behaviour when i am trying to respond to the comments. Hence i am adding the resposes to comments as below.
STS is a server and its best way of deployment in K8S cluster is either done through the helm chart or through the yaml file(although it can be done through the method you had suggested, but i guess that scenario would be a rare case and there will be no HA of the STS server if it is triggered from outside).
By default the script returns but can be made to block by setting the environment variable SPARK_NO_DAEMONIZE. Once this is done, script blocks until the thrift server pod is shut down
Will add it as a separate PR. Pls merge this, if you are ok with the responses. |
erikerlandson
commented
Oct 22, 2018
@suryag10 you were probably encountering github server problems from yesterday: |
erikerlandson
commented
Oct 22, 2018
@suryag10, all things being equal, it is considered preferable to provide testing for new functionality on the same PR. Are there are logistical problems adding testing here? |
vanzin
commented
Dec 21, 2018
The bug here should be SPARK-23078; no point in filing duplicate bugs. Also, could anyone answer my question in the bug? Seems like we don't need this anymore. |
vanzin
commented
Jan 25, 2019
No updates on the bug so I assume what I wrote is correct. Closing. |
What changes were proposed in this pull request?
Code is enhanced to allow the STS run in kubernetes deployment with spark deploy mode of cluster.
How was this patch tested?
Started the sts in cluster mode in K8S deployment and was able to run some queries using the beeline client.