Commit 25eb53d
[KYUUBI #5680] Optimize Spark engine pod name generation
### _Why are the changes needed?_
Close #5680
**Background**:
1) In default case, when kyuubi submit spark sql engine on kubernetes, will generate spark driver pod name with "kyuubi-${app_name}-${engine_ref_id}-driver".
2) And app_name will be "kyuubi_${shareLevel}_${engineType}_${appUser}_${engineRefId}" if not set by user.
3) In result, we may get spark driver pod name with "kyuubi-kyuubi-${shareLevel}-${engineType}-${appUser}-${engineRefId}-${engineRefId}-driver".
4) We were hoping for a more concise and readable name, such as "kyuubi-${shareLevel}-${engineType}-${appUser}-${app_name}-${engineRefId}-driver".
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
**1) Before modification:**
Left is unset `spark.app.name`, and right is set to “ocean”

**2) Modify the code**

**3) Build module and get the jar**

**4) Build a new images**

**5) After modification:**

- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
### _Was this patch authored or co-authored using generative AI tooling?_
No
Closes #5695 from Ocean22/master.
Closes #5680
6dbac57 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/util/KubernetesUtils.scala
5ddc9f6 [no 会 English] Update KubernetesUtils.scala
b685b60 [no 会 English] Update KubernetesUtils.scala
6a64e17 [no 会 English] Update KubernetesUtils.scala
1335bbd [no 会 English] Update EngineRef.scala
f2af955 [no 会 English] Update KubernetesUtils.scala
891f172 [no 会 English] Update KubernetesUtils.scala
c20b755 [no 会 English] Update EngineRef.scala
09f3ed1 [no 会 English] Update EngineRef.scala
64bd2c1 [no 会 English] Update EngineRef.scala
Lead-authored-by: Ocean22 <1058853680@qq.com>
Co-authored-by: no 会 English <45907917+Ocean22@users.noreply.github.com>
Co-authored-by: Cheng Pan <pan3793@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>1 parent 2a39d69 commit 25eb53d
File tree
1 file changed
+22
-4
lines changed- kyuubi-server/src/main/scala/org/apache/kyuubi/util
1 file changed
+22
-4
lines changedLines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
| |||
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
149 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
150 | 168 | | |
151 | 169 | | |
152 | 170 | | |
| |||
0 commit comments