RANGER-5478: replace hadoop-common dependency with hadoop-client-api and hadoop-client-runtime#833
Merged
mneethiraj merged 2 commits intoapache:masterfrom Feb 3, 2026
Merged
Conversation
…and hadoop-client-runtime
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces the hadoop-common and hadoop-hdfs dependencies with hadoop-client-api and hadoop-client-runtime across the Ranger codebase. This change simplifies dependency management by removing numerous exclusions that were previously required when using hadoop-common and hadoop-hdfs.
Changes:
- Replaced
hadoop-commonandhadoop-hdfsdependencies withhadoop-client-apiandhadoop-client-runtimein multiple modules - Removed
log4j-over-slf4jtest dependencies across various modules - Updated import statements to use shaded versions of common libraries (e.g.,
org.apache.hadoop.shaded.com.google.common.io.Resources) - Added explicit dependencies for previously transitive dependencies (e.g.,
javax.servlet-api,jsr305,jackson-core,jackson-databind)
Reviewed changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Updated parent POM to replace hadoop-common and hadoop-hdfs with hadoop-client-api and hadoop-client-runtime in dependency management |
| storm-agent/pom.xml | Replaced hadoop-common and hadoop-hdfs with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| ranger-presto-plugin-shim/pom.xml | Replaced hadoop-hdfs with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| ranger-metrics/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime |
| ranger-metrics/src/main/java/org/apache/ranger/metrics/source/RangerMetricsContainerSource.java | Changed VisibleForTesting import from Guava to Hadoop annotation |
| ranger-metrics/src/main/java/org/apache/ranger/metrics/sink/RangerMetricsPrometheusSink.java | Updated SubsetConfiguration import to use shaded version from hadoop-client-runtime |
| ranger-metrics/src/main/java/org/apache/ranger/metrics/sink/RangerMetricsJsonSink.java | Updated SubsetConfiguration import to use shaded version and renamed parameter |
| ranger-authn/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, added javax.servlet-api and slf4j-api dependencies |
| ranger-common-ha/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| ranger-examples/plugin-sampleapp/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| credentialbuilder/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| agents-cred/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, added hadoop-auth dependency, removed exclusions and log4j-over-slf4j dependency |
| agents-common/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, added jsr305 and javax.servlet-api dependencies, removed exclusions and log4j-over-slf4j dependency |
| agents-common/src/main/java/org/apache/ranger/plugin/util/RangerCache.java | Replaced @NotNull annotation from com.sun.istack with @nonnull from javax.annotation |
| agents-audit/dest-hdfs/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| agents-audit/core/pom.xml | Added jackson-core and jackson-databind dependencies, removed log4j-over-slf4j dependency |
| agents-audit/dest-cloudwatch/pom.xml | Added jsr305 dependency, removed log4j-over-slf4j dependency |
| hbase-agent/pom.xml | Replaced hadoop-common with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| hdfs-agent/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuditHandler.java | Changed CollectionUtils import from commons-collections to commons-collections4 |
| plugin-kafka/pom.xml | Replaced hadoop-hdfs with hadoop-client-api and hadoop-client-runtime, removed exclusions and log4j-over-slf4j dependency |
| plugin-ozone/pom.xml | Replaced hadoop-hdfs with hadoop-client-api and hadoop-client-runtime, removed exclusions |
| plugin-schema-registry/pom.xml | Replaced hadoop-hdfs with hadoop-client-api and hadoop-client-runtime in dependency management, removed exclusions and log4j-over-slf4j dependency |
| plugin-nifi-registry/pom.xml | Added hadoop-client-api and hadoop-client-runtime dependencies |
| plugin-nifi-registry/src/test/java/org/apache/ranger/services/nifi/registry/client/TestNiFiRegistryClient.java | Updated Resources import to use shaded version from Hadoop |
| knox-agent/pom.xml | Replaced hadoop-hdfs with hadoop-client-api and hadoop-client-runtime, removed exclusions |
| kms/pom.xml | Removed hadoop-hdfs dependency and log4j-over-slf4j dependency |
| security-admin/pom.xml | Removed hadoop-hdfs dependency and log4j-over-slf4j dependency |
| ugsync/pom.xml | Removed log4j-over-slf4j dependency |
| tagsync/pom.xml | Removed log4j-over-slf4j dependency |
| Multiple plugin-shim/pom.xml files | Removed log4j-over-slf4j test dependency |
| Multiple ranger-examples/pom.xml files | Removed log4j-over-slf4j dependency |
| embeddedwebserver/pom.xml | Removed log4j-over-slf4j dependency |
| Multiple distro assembly files | Updated to include hadoop-client-api and hadoop-client-runtime instead of hadoop-hdfs, removed log4j-over-slf4j references |
| distro/src/main/assembly/hdfs-agent.xml | Added commons-collections4 dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…lace hadoop-common with hadoop-client-api and hadoop-client-runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Replaced hadoop-common dependency with dependecy on libraries hadoop-client-api and hadoop-client-runtime.
How was this patch tested?