Commit 4e8701a
committed
[SPARK-35280][K8S] Promote KubernetesUtils to DeveloperApi
### What changes were proposed in this pull request?
Since SPARK-22757, `KubernetesUtils` has been used as an important utility class by all K8s modules and `ExternalClusterManager`s. This PR aims to promote `KubernetesUtils` to `DeveloperApi` in order to maintain it officially in a backward compatible way at Apache Spark 3.2.0.
### Why are the changes needed?
Apache Spark 3.1.1 makes `Kubernetes` module GA and provides an extensible external cluster manager framework. To have `ExternalClusterManager` for K8s environment, `KubernetesUtils` class is crucial and needs to be stable. By promoting to a subset of K8s developer API, we can maintain these more sustainable way and give a better and stable functionality to K8s users.
In this PR, `Since` annotations denote the last function signature changes because these are going to become public at Apache Spark 3.2.0.
| Version | Function Name |
|-|-|
| 2.3.0 | parsePrefixedKeyValuePairs |
| 2.3.0 | requireNandDefined |
| 2.3.0 | parsePrefixedKeyValuePairs |
| 2.4.0 | parseMasterUrl |
| 3.0.0 | requireBothOrNeitherDefined |
| 3.0.0 | requireSecondIfFirstIsDefined |
| 3.0.0 | selectSparkContainer |
| 3.0.0 | formatPairsBundle |
| 3.0.0 | formatPodState |
| 3.0.0 | containersDescription |
| 3.0.0 | containerStatusDescription |
| 3.0.0 | formatTime |
| 3.0.0 | uniqueID |
| 3.0.0 | buildResourcesQuantities |
| 3.0.0 | uploadAndTransformFileUris |
| 3.0.0 | uploadFileUri |
| 3.0.0 | requireBothOrNeitherDefined |
| 3.0.0 | buildPodWithServiceAccount |
| 3.0.0 | isLocalAndResolvable |
| 3.1.1 | renameMainAppResource |
| 3.1.1 | addOwnerReference |
| 3.2.0 | loadPodFromTemplate |
### Does this PR introduce _any_ user-facing change?
Yes, but this is new API additions.
### How was this patch tested?
Pass the CIs.
Closes #32406 from dongjoon-hyun/SPARK-35280.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>1 parent 39889df commit 4e8701a
File tree
1 file changed
+29
-1
lines changed- resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s
1 file changed
+29
-1
lines changedresource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| 79 | + | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| |||
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
99 | 112 | | |
100 | 113 | | |
101 | 114 | | |
| 115 | + | |
102 | 116 | | |
103 | 117 | | |
104 | 118 | | |
| |||
125 | 139 | | |
126 | 140 | | |
127 | 141 | | |
| 142 | + | |
128 | 143 | | |
129 | 144 | | |
| 145 | + | |
130 | 146 | | |
131 | 147 | | |
132 | 148 | | |
| |||
141 | 157 | | |
142 | 158 | | |
143 | 159 | | |
| 160 | + | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
| |||
164 | 181 | | |
165 | 182 | | |
166 | 183 | | |
| 184 | + | |
167 | 185 | | |
168 | 186 | | |
169 | 187 | | |
| |||
173 | 191 | | |
174 | 192 | | |
175 | 193 | | |
| 194 | + | |
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
| |||
200 | 219 | | |
201 | 220 | | |
202 | 221 | | |
| 222 | + | |
203 | 223 | | |
204 | 224 | | |
205 | 225 | | |
| |||
212 | 232 | | |
213 | 233 | | |
214 | 234 | | |
| 235 | + | |
215 | 236 | | |
216 | 237 | | |
217 | 238 | | |
| |||
228 | 249 | | |
229 | 250 | | |
230 | 251 | | |
| 252 | + | |
231 | 253 | | |
232 | 254 | | |
233 | 255 | | |
| |||
247 | 269 | | |
248 | 270 | | |
249 | 271 | | |
| 272 | + | |
250 | 273 | | |
251 | 274 | | |
252 | 275 | | |
| |||
261 | 284 | | |
262 | 285 | | |
263 | 286 | | |
| 287 | + | |
264 | 288 | | |
265 | 289 | | |
266 | 290 | | |
267 | 291 | | |
268 | 292 | | |
| 293 | + | |
269 | 294 | | |
270 | 295 | | |
271 | 296 | | |
| |||
281 | 306 | | |
282 | 307 | | |
283 | 308 | | |
| 309 | + | |
284 | 310 | | |
285 | 311 | | |
286 | 312 | | |
| |||
325 | 351 | | |
326 | 352 | | |
327 | 353 | | |
| 354 | + | |
328 | 355 | | |
329 | 356 | | |
330 | 357 | | |
| |||
338 | 365 | | |
339 | 366 | | |
340 | 367 | | |
| 368 | + | |
341 | 369 | | |
342 | 370 | | |
343 | 371 | | |
| |||
0 commit comments