leoluan2009 commented on code in PR #3836:
URL: https://github.com/apache/incubator-kyuubi/pull/3836#discussion_r1029423356


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala:
##########
@@ -162,9 +162,11 @@ private[v1] class BatchesResource extends 
ApiRequestContext with Logging {
     require(
       supportedBatchType(request.getBatchType),
       s"${request.getBatchType} is not in the supported list: 
$SUPPORTED_BATCH_TYPES}")
-    require(request.getResource != null, "resource is a required parameter")
-    require(request.getClassName != null, "classname is a required parameter")
     request.setBatchType(request.getBatchType.toUpperCase(Locale.ROOT))
+    require(request.getResource != null, "resource is a required parameter")
+    if (request.getBatchType.equals("SPARK")) {

Review Comment:
   I think it has be checked before
   `    require(
         supportedBatchType(request.getBatchType),
         s"${request.getBatchType} is not in the supported list: 
$SUPPORTED_BATCH_TYPES}")
       request.setBatchType(request.getBatchType.toUpperCase(Locale.ROOT))`



-- 
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]

Reply via email to