bowenliang123 commented on code in PR #5498:
URL: https://github.com/apache/kyuubi/pull/5498#discussion_r1368745423
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala:
##########
@@ -238,4 +238,53 @@ class BatchRestApiSuite extends RestClientTestHelper with
BatchTestHelper {
assert(
batchSession.conf.get(KyuubiReservedKeys.KYUUBI_CLIENT_VERSION_KEY) ==
Some(KYUUBI_VERSION))
}
+
+ test("pyspark submit - basic batch rest client with existing resource file")
{
Review Comment:
Create a dedicated batch API suite for PySpark jobs.
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/server/rest/client/BatchRestApiSuite.scala:
##########
@@ -238,4 +238,53 @@ class BatchRestApiSuite extends RestClientTestHelper with
BatchTestHelper {
assert(
batchSession.conf.get(KyuubiReservedKeys.KYUUBI_CLIENT_VERSION_KEY) ==
Some(KYUUBI_VERSION))
}
+
+ test("pyspark submit - basic batch rest client with existing resource file")
{
+ val basicKyuubiRestClient: KyuubiRestClient =
+ KyuubiRestClient.builder(baseUri.toString)
+ .authHeaderMethod(KyuubiRestClient.AuthHeaderMethod.BASIC)
+ .username(ldapUser)
+ .password(ldapUserPasswd)
+ .socketTimeout(30000)
+ .build()
+ val batchRestApi: BatchRestApi = new BatchRestApi(basicKyuubiRestClient)
+
+ val requestObj = newBatchRequest(
+ batchType = PySparkJobPI.batchType,
+ resource = PySparkJobPI.resource.get,
+ className = null,
Review Comment:
As mentioned in PR descriptions, it's a key point to set the className here
to `null`. Is it applicable to all pyspark jobs ? If so , whether we could have
a follow-up PR to skip sending className the pyspark batch type?
##########
kyuubi-server/src/test/scala/org/apache/kyuubi/BatchTestHelper.scala:
##########
@@ -36,6 +36,22 @@ trait BatchTestHelper {
_.getName.startsWith("spark-examples")) map (_.getCanonicalPath)
}
+ object PySparkJobPI {
Review Comment:
Move the variables to the suite for pyspark jobs.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]