spark-instrumented-optimizer/resource-managers/kubernetes
yangjie01 9cefde8db3 [SPARK-36580][CORE][K8S] Use intersect and diff API on Set instead of manual implementation
### What changes were proposed in this pull request?
The main change of this pr is replace `filter` + `contains` with `intersect` api and `filterNot` + `contains` with `diff`

**Before**

```scala
val set = Set(1, 2)
val others = Set(2, 3)
set.filter(others.contains(_))
set.filterNot(others.contains)
```

**After**
```scala
val set = Set(1, 2)
val others = Set(2, 3)
set.intersect(others)
set.diff(others)
```

### Why are the changes needed?
Code simplification, replace manual implementation with existing API

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass the Jenkins or GitHub Action

Closes #33829 from LuciferYang/SPARK-36580.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
2021-08-29 09:24:37 -07:00
..
core [SPARK-36580][CORE][K8S] Use intersect and diff API on Set instead of manual implementation 2021-08-29 09:24:37 -07:00
docker/src/main/dockerfiles/spark [SPARK-36058][K8S] Add support for statefulset APIs in K8s 2021-08-25 17:38:57 -07:00
integration-tests [SPARK-36058][K8S] Add support for statefulset APIs in K8s 2021-08-25 17:38:57 -07:00