Commit 27f0baf
committed
### What changes were proposed in this pull request?
This PR aims to
- Use `org.apache.spark.util.Pair` class instead of `org.apache.commons.lang3.tuple.Pair`
- Add a Checkstyle rule to ban `org.apache.commons.lang3.tuple` package
### Why are the changes needed?
To be consistent with the Apache Spark main repository.
- apache/spark#51568
Since Java 16, we can use `Records` officially in Java and Spark supports `Pair` via Java Record.
| VERSION | JEP |
| - | - |
| Java 14 | [JEP 359: Records (Preview)](https://openjdk.org/jeps/359) |
| Java 15 | [JEP 384: Records (Second Preview)](https://openjdk.org/jeps/384) |
| Java 16 | [JEP 395: Records](https://openjdk.org/jeps/395) |
### Does this PR introduce _any_ user-facing change?
No behavior change.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #368 from dongjoon-hyun/SPARK-53817.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 5eed495 commit 27f0baf
File tree
2 files changed
+4
-3
lines changed- config/checkstyle
- spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/source
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | 38 | | |
40 | 39 | | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
0 commit comments