holdenk commented on a change in pull request #25870: [SPARK-27936][K8S]
support python deps
URL: https://github.com/apache/spark/pull/25870#discussion_r335822303
##########
File path:
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/DepsTestsSuite.scala
##########
@@ -183,6 +187,62 @@ private[spark] trait DepsTestsSuite { k8sSuite:
KubernetesSuite =>
}
}
+ test("Launcher python client dependencies using py", k8sTestTag,
MinikubeTag) {
+ val depsFile = Utils.getTestFileAbsolutePath("py_container_checks.py",
sparkHomeDir)
+ testPythonDeps(depsFile)
+ }
+
+ test("Launcher python client dependencies using a zip file", k8sTestTag,
MinikubeTag) {
+ val inDepsFile = Utils.getTestFileAbsolutePath("py_container_checks.py",
sparkHomeDir)
+ val outDepsFile = s"${inDepsFile.substring(0,
inDepsFile.lastIndexOf("."))}.zip"
+ Utils.createZipFile(inDepsFile, outDepsFile)
+ testPythonDeps(outDepsFile)
+ }
+
+ private def testPythonDeps(depsFile: String): Unit = {
+ try {
+ setupCephStorage()
+ val cephUrlStr = getServiceUrl(svcName)
+ val cephUrl = new URL(cephUrlStr)
+ val cephHost = cephUrl.getHost
+ val cephPort = cephUrl.getPort
+ val examplesJar =
Utils.getTestFileAbsolutePath(Utils.getExamplesJarName(), sparkHomeDir)
+
+ val (accessKey, secretKey) = getCephCredentials()
+ sparkAppConf
+ .set("spark.kubernetes.container.image", pyImage)
+ .set("spark.kubernetes.pyspark.pythonVersion", "2")
Review comment:
Lets not use Python 2 since this is targeted for Spark 3 I believe.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]