From 6a194f197819e2970f619ed92321e0a0b716bf37 Mon Sep 17 00:00:00 2001 From: HyukjinKwon Date: Thu, 4 Feb 2021 17:31:36 +0900 Subject: [PATCH] [SPARK-33212][FOLLOW-UP][BUILD] Uses provided properties for Hadoop client dependencies in root pom ### What changes were proposed in this pull request? This PR is a followup of https://github.com/apache/spark/pull/30701. It uses properties of `hadoop-client-api.artifact`, `hadoop-client-runtime.artifact` and `hadoop-client-minicluster.artifact` explicitly to set the dependencies and versions. Otherwise, it is logically incorrect. For example, if you build with Hadoop 2, this dependency becomes `hadoop-client-api:2.7.4` internally, which does not exist in Hadoop 2 (https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client-api). ### Why are the changes needed? - To fix the logical incorrectness. - It fixes a potential issue: this actually caused an issue when `generate-sources` plugin is used together with Hadoop 2 by default, which attempts to pull 2.7.4 of `hadoop-client-api`, `hadoop-client-runtime` and `hadoop-client-minicluster` for whatever reason. ### Does this PR introduce _any_ user-facing change? No for users and dev. It's more a cleanup. ### How was this patch tested? Manually checked the dependencies are correctly placed. Closes #31467 from HyukjinKwon/SPARK-33212. Authored-by: HyukjinKwon Signed-off-by: HyukjinKwon --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 385fba7ac2..8bb618c979 100644 --- a/pom.xml +++ b/pom.xml @@ -1079,19 +1079,19 @@ org.apache.hadoop - hadoop-client-api + ${hadoop-client-api.artifact} ${hadoop.version} ${hadoop.deps.scope} org.apache.hadoop - hadoop-client-runtime + ${hadoop-client-runtime.artifact} ${hadoop.version} ${hadoop.deps.scope} org.apache.hadoop - hadoop-client-minicluster + ${hadoop-client-minicluster.artifact} ${yarn.version} test