Ocean22 commented on code in PR #5695:
URL: https://github.com/apache/kyuubi/pull/5695#discussion_r1398690325


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/util/KubernetesUtils.scala:
##########
@@ -137,6 +137,8 @@ object KubernetesUtils extends Logging {
     lazy val resolvedResourceName = s"kyuubi-${getResourceNamePrefix(appName, 
engineRefId)}-driver"
     if (forciblyRewrite || resolvedResourceName.length > 
DRIVER_POD_NAME_MAX_LENGTH) {
       s"kyuubi-$engineRefId-driver"
+    } else if (appName.contains(engineRefId)){
+      getResourceNamePrefix(appName, "driver")
     } else {
       resolvedResourceName
     }

Review Comment:
   > 
   Yes,you are right.And I tested with your code and it passed, but about 
`resourceNamePrefix. startsWith ("kyuubi")`, if  `spark. app. name` is set to 
the name starting with kyuubi, it will have the effect of the arrow in the 
photo. So should it be changed to `resourceNamePrefix. startsWith ("kyuubi-")`?
   
![企业微信截图_17004520968190](https://github.com/apache/kyuubi/assets/45907917/9b7de5c8-29d9-4764-aee1-919d1dad4ec3)
   



##########
kyuubi-server/src/main/scala/org/apache/kyuubi/util/KubernetesUtils.scala:
##########
@@ -137,6 +137,8 @@ object KubernetesUtils extends Logging {
     lazy val resolvedResourceName = s"kyuubi-${getResourceNamePrefix(appName, 
engineRefId)}-driver"
     if (forciblyRewrite || resolvedResourceName.length > 
DRIVER_POD_NAME_MAX_LENGTH) {
       s"kyuubi-$engineRefId-driver"
+    } else if (appName.contains(engineRefId)){
+      getResourceNamePrefix(appName, "driver")
     } else {
       resolvedResourceName
     }

Review Comment:
   > 
   Yes,you are right.And I tested with your code and it passed, but about 
`resourceNamePrefix. startsWith ("kyuubi")`, if  `spark. app. name` is set to 
the name starting with kyuubi, it will have the effect of the arrow in the 
photo. So should it be changed to `resourceNamePrefix. startsWith ("kyuubi-")`?
   
![企业微信截图_17004520968190](https://github.com/apache/kyuubi/assets/45907917/9b7de5c8-29d9-4764-aee1-919d1dad4ec3)
   



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