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-")`?

##########
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-")`?

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