spark-instrumented-optimizer/common
Chao Sun cfc1bc295a [SPARK-36873][BUILD][TEST-MAVEN] Add provided Guava dependency for network-yarn module
### What changes were proposed in this pull request?

Add provided Guava dependency to `network-yarn` module.

### Why are the changes needed?

In Spark 3.1 and earlier the `network-yarn` module implicitly relies on Guava from `hadoop-client` dependency. This was changed by SPARK-33212 where we moved to shaded Hadoop client which no longer expose the transitive Guava dependency. It stayed fine for a while since we were not using `createDependencyReducedPom` so it picks up the transitive dependency from `spark-network-common` instead. However, things start to break after SPARK-36835 where we restored `createDependencyReducedPom` and now it is no longer able to locate Guava classes:

```
build/mvn test -pl common/network-yarn -Phadoop-3.2 -Phive-thriftserver -Pkinesis-asl -Pkubernetes -Pmesos -Pnetlib-lgpl -Pscala-2.12 -Pspark-ganglia-lgpl -Pyarn
...
[INFO] Compiling 1 Java source to /Users/sunchao/git/spark/common/network-yarn/target/scala-2.12/classes ...
[WARNING] [Warn] : bootstrap class path not set in conjunction with -source 8
[ERROR] [Error] /Users/sunchao/git/spark/common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java:32: package com.google.common.annotations does not exist
[ERROR] [Error] /Users/sunchao/git/spark/common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java:33: package com.google.common.base does not exist
[ERROR] [Error] /Users/sunchao/git/spark/common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java:34: package com.google.common.collect does not exist
[ERROR] [Error] /Users/sunchao/git/spark/common/network-yarn/src/main/java/org/apache/spark/network/yarn/YarnShuffleService.java:118: cannot find symbol
  symbol:   class VisibleForTesting
  location: class org.apache.spark.network.yarn.YarnShuffleService
```

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

No

### How was this patch tested?

Tested with the above `mvn` command and it's now passing.

Closes #34125 from sunchao/SPARK-36873.

Authored-by: Chao Sun <sunchao@apple.com>
Signed-off-by: Gengliang Wang <gengliang@apache.org>
(cherry picked from commit 53f58b6e51)
Signed-off-by: Gengliang Wang <gengliang@apache.org>
2021-09-28 18:23:43 +08:00
..
kvstore Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00
network-common Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00
network-shuffle Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00
network-yarn [SPARK-36873][BUILD][TEST-MAVEN] Add provided Guava dependency for network-yarn module 2021-09-28 18:23:43 +08:00
sketch Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00
tags Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00
unsafe Preparing development version 3.2.1-SNAPSHOT 2021-09-27 08:24:50 +00:00