Skip to content

MAPREDUCE-7535. Setting the JSON provider to the customized one for M…#8298

Merged
brumi1024 merged 2 commits intoapache:trunkfrom
p-szucs:MAPREDUCE-7535-json-provider
Mar 10, 2026
Merged

MAPREDUCE-7535. Setting the JSON provider to the customized one for M…#8298
brumi1024 merged 2 commits intoapache:trunkfrom
p-szucs:MAPREDUCE-7535-json-provider

Conversation

@p-szucs
Copy link
Contributor

@p-szucs p-szucs commented Mar 4, 2026

…R webapp

Change-Id: I69d33a9d498e65504d805c6c2b9bdcc646c372c0

Description of PR

After a customized Moxy JSON provider has been introduced in the MR AM Webapp in MAPREDUCE-7530 we need to set "jersey.config.jsonFeature" property to the customized JsonProviderFeature to prevent automatic discovery of legacy providers like EntityFilteringFeature.

As I could see the jersey-provided moxy in jersey media module also has this configuration, but we are using native moxy in Hadoop, so it is necessary to configure this setting explicitly

How was this patch tested?

Tested MR jobs on a Hadoop cluster

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

AI Tooling

If an AI tool was used:

…R webapp

Change-Id: I69d33a9d498e65504d805c6c2b9bdcc646c372c0
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 34s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 41m 4s trunk passed
+1 💚 compile 1m 0s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 compile 1m 0s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 checkstyle 1m 0s trunk passed
+1 💚 mvnsite 1m 3s trunk passed
+1 💚 javadoc 1m 1s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 57s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 1m 31s trunk passed
+1 💚 shadedclient 28m 49s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 29s the patch passed
+1 💚 compile 0m 29s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javac 0m 29s the patch passed
+1 💚 compile 0m 28s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 javac 0m 28s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 23s the patch passed
+1 💚 mvnsite 0m 31s the patch passed
+1 💚 javadoc 0m 26s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 27s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 1m 8s the patch passed
+1 💚 shadedclient 27m 31s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 8m 24s hadoop-mapreduce-client-app in the patch passed.
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
121m 6s
Subsystem Report/Notes
Docker ClientAPI=1.53 ServerAPI=1.53 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/1/artifact/out/Dockerfile
GITHUB PR #8298
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux a03693e3d6c3 5.15.0-168-generic #178-Ubuntu SMP Fri Jan 9 19:05:03 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 75f6f24
Default Java Ubuntu-17.0.18+8-Ubuntu-124.04.1
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/1/testReport/
Max. process+thread count 694 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/1/console
versions git=2.43.0 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@K0K0V0K K0K0V0K left a comment

Choose a reason for hiding this comment

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

Thanks Peter for fixing this up!
LGTM!

@p-szucs
Copy link
Contributor Author

p-szucs commented Mar 6, 2026

Hi @slfan1989 , @brumi1024,
May I ask a review on this fix please, if you will have some time for it?

public boolean configure(FeatureContext context) {
//Auto discovery should be disabled to ensure the custom providers will be used
context.property(CommonProperties.MOXY_JSON_FEATURE_DISABLE, true);
context.property("jersey.config.jsonFeature", "JsonProviderFeature");
Copy link
Member

Choose a reason for hiding this comment

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

Nit: instead of hardcoding this org.glassfish.jersey.internal.InternalProperties -> InternalProperties.JSON_FEATURE could maybe used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @brumi1024, fixed the property

Change-Id: Iee79bab1f26042dc6e1ed57f5f5931ecb6a7eb16
Copy link
Member

@brumi1024 brumi1024 left a comment

Choose a reason for hiding this comment

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

Thanks @p-szucs for the update, latest state LGTM. Will merge it once the CI finishes.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 19m 45s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 49m 16s trunk passed
+1 💚 compile 0m 58s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 compile 0m 54s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 checkstyle 0m 51s trunk passed
+1 💚 mvnsite 0m 57s trunk passed
+1 💚 javadoc 0m 53s trunk passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 51s trunk passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 1m 31s trunk passed
+1 💚 shadedclient 37m 2s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 30s the patch passed
+1 💚 compile 0m 28s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javac 0m 28s the patch passed
+1 💚 compile 0m 29s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 javac 0m 29s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 24s the patch passed
+1 💚 mvnsite 0m 31s the patch passed
+1 💚 javadoc 0m 25s the patch passed with JDK Ubuntu-21.0.10+7-Ubuntu-124.04
+1 💚 javadoc 0m 25s the patch passed with JDK Ubuntu-17.0.18+8-Ubuntu-124.04.1
+1 💚 spotbugs 1m 12s the patch passed
+1 💚 shadedclient 33m 59s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 9m 32s hadoop-mapreduce-client-app in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
163m 37s
Subsystem Report/Notes
Docker ClientAPI=1.54 ServerAPI=1.54 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/2/artifact/out/Dockerfile
GITHUB PR #8298
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 550b260f5e26 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / f85003a
Default Java Ubuntu-17.0.18+8-Ubuntu-124.04.1
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/2/testReport/
Max. process+thread count 622 (vs. ulimit of 5500)
modules C: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app U: hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8298/2/console
versions git=2.43.0 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@brumi1024 brumi1024 merged commit 3e8a468 into apache:trunk Mar 10, 2026
1 of 3 checks passed
@p-szucs
Copy link
Contributor Author

p-szucs commented Mar 10, 2026

Thanks a lot @brumi1024 for the review and the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants