HIVE-30011: MR jobs submitted outside ExecDriver miss the JDK 17 --add-opens flags - #6755
Open
shmilygkd wants to merge 1 commit into
Open
HIVE-30011: MR jobs submitted outside ExecDriver miss the JDK 17 --add-opens flags#6755shmilygkd wants to merge 1 commit into
shmilygkd wants to merge 1 commit into
Conversation
|
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?
Move the
--add-opensinjection for MR jobs from a private method inExecDriverintoJavaVersionUtils.addOpensFlags(Configuration)and call it from every code path that submits an MR job throughJobClient:ExecDriver.execute(unchanged behaviour, now delegates to the helper)MergeFileTask.execute(ALTER TABLE ... CONCATENATEon the MR engine)ColumnTruncateTask.execute(TRUNCATE TABLE ... COLUMNSon RCFile tables)MRCompactor.launchCompactionJob(MR-based ACID compaction launched by the metastore Worker)The helper appends the flags to
mapreduce.map.java.opts,mapreduce.reduce.java.optsandyarn.app.mapreduce.am.command-opts, keeping whatever is already configured.TestJavaVersionUtilsis added to cover the helper.Why are the changes needed?
HIVE-28869 only injects the flags in
ExecDriver. The three paths above submit MR jobs directly, so on a JDK 17 cluster whosemapred-site.xmldoes not carry the flags their task JVMs fail on the first reflective access intojava.base, for example:MRCompactoris still the default compactor for full-CRUD tables (hive.compactor.crud.query.based=false), so this affects regular ACID maintenance, not only the MR engine.Does this PR introduce any user-facing change?
No.
How was this patch tested?
TestJavaVersionUtils#testAddOpensFlagsAppendedToMRJobOpts(existing-Xmxvalue preserved, all three keys end with the flag set).*.java.optsis ignored, so the container command line cannot be exercised in CI. An equivalent patch on a 3.1.x-based build was verified on a 3-node YARN cluster (Hadoop 3.4.3, JDK 17 on submitter and containers, no cluster-side--add-opens): before the patchALTER TABLE ... CONCATENATEfailed as above; after it the AM and tasklaunch_container.shof the merge job, the RCFile column-truncate job and a metastore-launched major compaction all carry the flags and the jobs succeed.