PHOENIX-7953 Add addPhoenixDependencyJars utility for MapReduce jobs#2564
Open
ujjawal4046 wants to merge 3 commits into
Open
PHOENIX-7953 Add addPhoenixDependencyJars utility for MapReduce jobs#2564ujjawal4046 wants to merge 3 commits into
ujjawal4046 wants to merge 3 commits into
Conversation
Contributor
added 3 commits
July 3, 2026 11:15
Add PhoenixMapReduceUtil.addPhoenixDependencyJars(Configuration) that registers Phoenix and its transitive dependency jars with the YARN distributed cache (tmpjars), analogous to HBase addHBaseDependencyJars. Without this, MR jobs that use Phoenix fail with NoClassDefFoundError on YARN containers for jars like json-path, bson, phoenix-hbase-compat, commons-csv, etc. that are on the client classpath but not shipped to the container. Update all Phoenix MR tools (UpdateStatisticsTool, IndexTool, IndexScrutinyTool, PhoenixSyncTableTool, TransformTool, MultiHfileOutputFormat) to call the new method. AI-assisted: Claude
…ix-core-server Add explicit compile-scope dependency entries for disruptor, json-path, and bson which are used directly in PhoenixMapReduceUtil but were only available transitively via phoenix-core-client. AI-assisted: Claude
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.
Summary
PhoenixMapReduceUtil.addPhoenixDependencyJars(Configuration)that registers Phoenix and its transitive dependency jars with the YARN distributed cache (tmpjars), analogous to HBase'saddHBaseDependencyJars.NoClassDefFoundErroron YARN containers for jars like json-path, bson, phoenix-hbase-compat, commons-csv, etc.Motivation
After upgrading to Phoenix 5.3, several new transitive dependencies (json-path, bson, phoenix-hbase-compat as a separate jar) are required at runtime but were not being shipped to YARN containers. Each Phoenix MR tool was independently maintaining an incomplete list of classes to ship. This centralizes the logic so downstream consumers and Phoenix's own tools stay in sync.
JIRA: https://issues.apache.org/jira/browse/PHOENIX-7953
Test plan
PhoenixMapReduceUtilTestverifies all expected jars appear intmpjarsNoClassDefFoundErrorNoClassDefFoundErrorNote
This code was AI-assisted using Claude (Anthropic).