Skip to content

RANGER-5478: replace hadoop-common dependency with hadoop-client-api and hadoop-client-runtime#833

Merged
mneethiraj merged 2 commits intoapache:masterfrom
mneethiraj:RANGER-5478
Feb 3, 2026
Merged

RANGER-5478: replace hadoop-common dependency with hadoop-client-api and hadoop-client-runtime#833
mneethiraj merged 2 commits intoapache:masterfrom
mneethiraj:RANGER-5478

Conversation

@mneethiraj
Copy link
Contributor

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?

  • verified that unit tests complete successfully
  • verified that Ranger servers admin/kms/usersync/tagsync startup up successfully
  • verified that plugins successfully enforce Ranger policies and generate audit logs

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-common and hadoop-hdfs dependencies with hadoop-client-api and hadoop-client-runtime in multiple modules
  • Removed log4j-over-slf4j test 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
Copy link
Contributor

@kumaab kumaab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mneethiraj mneethiraj merged commit 98af26f into apache:master Feb 3, 2026
22 of 32 checks passed
mneethiraj added a commit that referenced this pull request Feb 3, 2026
…and hadoop-client-runtime (#833)

(cherry picked from commit 98af26f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants