You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "joseluisll (via GitHub)" <gi...@apache.org> on 2026/10/18 18:08:35 UTC

[PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

joseluisll opened a new pull request, #8841:
URL: https://github.com/apache/hadoop/pull/8841

   ### Description of PR
   
   `ApplicationHistoryServer#configure` registers both `JettisonFeature` and `YarnJacksonJaxbJsonProvider`. Only `TimelineEntitiesWriter` and `TimelineEntityWriter` are registered as dedicated writers; the `config.packages("org.apache.hadoop.yarn.api.records.writer")` scan that looks meant to pick up the others names a package that does not exist. Everything else is written by whichever generic provider Jersey picks at startup, so the same request answers in a different shape from one start to the next:
   
   | Response | Jackson | Jettison |
   |---|---|---|
   | `POST /ws/v1/timeline`, no errors | `{"errors":[]}` | `{"response":""}` |
   | `GET .../apps` | `{"app":[...]}` | `{"apps":{"app":[...]}}` |
   | `GET .../apps/{appid}` | `{"appId":...}` | `{"app":{"appId":...}}` |
   | `GET .../containers/{id}/logs` | `[{...}]` | `{"containerLogsInfoes":{"containerLogsInfo":...}}` |
   
   The put row was observed on a live server; the other Jettison bodies are the shapes the old `TestAHSWebServices` asserted. Without a JAXB context, Jettison also collapses a one-element list to an object.
   
   On branch-3.4 `AHSWebApp` bound only `YarnJacksonJaxbJsonProvider`, and `TimelineServer.md` documents the Jackson shape. `LogsCLI#getAMContainerInfoForAHSWebService` reads a top-level `"appAttempt"` array, so `yarn logs -am` against the AHS needs the Jackson shape too.
   
   This PR:
   - registers only `YarnJacksonJaxbJsonProvider` in `ApplicationHistoryServer`, and drops the scan of the nonexistent package. That scan is left alone rather than pointed at `...records.timeline.writer`, whose writers use a plain `ObjectMapper` without the JAXB introspector and would introduce a third shape;
   - aligns `TestTimelineWebServices`, which registered the same pair;
   - moves `TestAHSWebServices` to the documented shape. It registered `JettisonFeature` with the AHS `JAXBContextResolver` and read log metadata through `ContainerLogsInfoListReader`, which parses only the Jettison wrapper. Both classes were used by nothing else and are removed;
   - adds `TestTimelineServerRequests#testPutResponseIsWrittenByJackson`, which posts an empty entity list to a live `ApplicationHistoryServer` and checks the body.
   
   Compatibility: on trunk, and likely on 3.5.x, which has the same registration, the AHS answers with either shape depending on the start. This restores the 3.4 and documented shape. Clients that adapted to the Jettison wrapper on 3.5 would see the same change as on any restart that happened to pick Jackson. One more field changes with it: container `allocatedResources` is written as a plain map (`{"yarn.io/gpu":2}`) instead of `{"entry":[{"key":...,"value":...}]}`.
   
   `TimelineReaderServer` and `NodeTimelineCollectorManager` (ATS v2) have the same pair and are handled in YARN-12026 (#8837). #8745 (YARN-11989) edits the same `configure` block; whichever lands second needs a trivial rebase.
   
   ### How was this patch tested?
   
   WSL2 Ubuntu 24.04, OpenJDK 17, on trunk 9ede2e95c6f.
   
   | Run | Result |
   |---|---|
   | New `TestTimelineServerRequests#testPutResponseIsWrittenByJackson`, without the fix, 6 fresh JVMs | 2 of 6 failed, body `{"response":""}` |
   | `mvn clean test` on `hadoop-yarn-server-applicationhistoryservice`, with the fix | Tests run: 213, Failures: 0, Errors: 0, Skipped: 0 |
   | `checkstyle:checkstyle` on the module | no violations on changed lines |
   
   ### For code changes:
   
   - [x] Does the title of this PR start 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](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
   
   ### AI Tooling
   
   - [x] The PR includes the phrase "Contains content generated by Claude Code"
         where <tool> is the name of the AI tool used.
   - [x] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html
   
   Contains content generated by Claude Code.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "hadoop-yetus (via GitHub) via common-issues" <co...@hadoop.apache.org>.
hadoop-yetus commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6535589240

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 23s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +0 :ok: |  markdownlint  |   0m  0s |  |  markdownlint was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to include 8 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |   2m 18s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |  28m 44s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   3m 48s |  |  trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  compile  |   3m 54s |  |  trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  checkstyle  |   1m 27s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   2m 52s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   2m 39s |  |  trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javadoc  |   2m 41s |  |  trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +0 :ok: |  spotbugs  |   0m 34s |  |  branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)  |
   | +1 :green_heart: |  shadedclient  |  17m 27s |  |  branch has no errors when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 16s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   1m 24s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 32s |  |  the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javac  |   3m 32s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 52s |  |  the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  javac  |   3m 52s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | +1 :green_heart: |  checkstyle  |   1m 27s |  |  hadoop-yarn-project/hadoop-yarn: The patch generated 0 new + 35 unchanged - 1 fixed = 35 total (was 36)  |
   | +1 :green_heart: |  mvnsite  |   2m 33s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 40s |  |  hadoop-yarn-api in the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu.  |
   | +1 :green_heart: |  javadoc  |   0m 45s |  |  hadoop-yarn-common in the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu.  |
   | +1 :green_heart: |  javadoc  |   0m 33s |  |  hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice-jdkUbuntu-21.0.12.1+1-1-24.04.4-Ubuntu with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu generated 0 new + 477 unchanged - 2 fixed = 477 total (was 479)  |
   | +1 :green_heart: |  javadoc  |   0m 28s |  |  hadoop-yarn-site in the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu.  |
   | +1 :green_heart: |  javadoc  |   0m 41s |  |  hadoop-yarn-api in the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu.  |
   | +1 :green_heart: |  javadoc  |   0m 44s |  |  hadoop-yarn-common in the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu.  |
   | +1 :green_heart: |  javadoc  |   0m 33s |  |  hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice-jdkUbuntu-17.0.20.1+1-1-24.04-Ubuntu with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu generated 0 new + 454 unchanged - 2 fixed = 454 total (was 456)  |
   | +1 :green_heart: |  javadoc  |   0m 27s |  |  hadoop-yarn-site in the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu.  |
   | +0 :ok: |  spotbugs  |   0m 22s |  |  hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site has no data from spotbugs  |
   | +1 :green_heart: |  shadedclient  |  16m 49s |  |  patch has no errors when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   0m 56s |  |  hadoop-yarn-api in the patch passed.  |
   | +1 :green_heart: |  unit  |   4m 40s |  |  hadoop-yarn-common in the patch passed.  |
   | +1 :green_heart: |  unit  |   3m 16s |  |  hadoop-yarn-server-applicationhistoryservice in the patch passed.  |
   | +1 :green_heart: |  unit  |   0m 28s |  |  hadoop-yarn-site in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 47s |  |  The patch does not generate ASF License warnings.  |
   |  |   | 124m 41s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/2/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8841 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint |
   | uname | Linux c5ac9b0e32ad 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 8d2f4d6a301fa2ca2c989e94b527f3896feac5da |
   | Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
   | Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/2/testReport/ |
   | Max. process+thread count | 616 (vs. ulimit of 10000) |
   | modules | C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/2/console |
   | versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
   | Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "joseluisll (via GitHub)" <gi...@apache.org>.
joseluisll commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6342693343

   @slfan1989 Hi, I got ready several PR about YARN. If you be so kind, please review them, when you can. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "joseluisll (via GitHub) via common-issues" <co...@hadoop.apache.org>.
joseluisll commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6540664387

    @pjfanning Build and yetus green, review comments applied. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#discussion_r4400672959


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -371,7 +369,7 @@ protected ResourceConfig configure() {
     config.register(TimelinePutResponseReader.class);
     config.register(new JerseyBinder());
     config.register(GenericExceptionHandler.class);
-    config.register(new JettisonFeature()).register(YarnJacksonJaxbJsonProvider.class);
+    config.register(YarnJacksonJaxbJsonProvider.class);

Review Comment:
   With Jettison gone, `YarnJacksonJaxbJsonProvider` writes everything not covered by a dedicated writer, so its `locateMapper()` now matters on every response:
   
   ```java
   ObjectMapper mapper = super.locateMapper(type, mediaType);
   configObjectMapper(mapper);
   if (type == TimelineAbout.class) {
     mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);
   }
   ```
   
   - `WRAP_ROOT_VALUE` is enabled on the shared mapper and never disabled. After the first `GET /ws/v1/timeline/about` (or `/ws/v1/applicationhistory/about`), every response is root-wrapped, e.g. put returns `{"response":{"errors":[]}}`, which `TimelinePutResponseReader` rejects with `UnrecognizedPropertyException`.
   - `configObjectMapper()` re-sets the introspector and inclusion on the singleton mapper per request, which races with concurrent writes.
   
   I think this needs fixing in the provider as part of (or before) this change. Otherwise the shape still depends on request history. A test that calls `/about` first and then posts an entity would catch it.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -360,7 +359,6 @@ protected ResourceConfig configure() {
     ResourceConfig config = new ResourceConfig();
     config.packages("org.apache.hadoop.yarn.server.timeline.webapp");
     config.packages("org.apache.hadoop.yarn.server.applicationhistoryservice.webapp");
-    config.packages("org.apache.hadoop.yarn.api.records.writer");
     config.register(TimelineWebServices.class);
     config.register(AHSWebServices.class);
     config.register(TimelineEntitiesWriter.class);

Review Comment:
   The description avoids pointing the scan at `records.timeline.writer` because those writers use a plain `ObjectMapper` and would add a third shape, but `TimelineEntitiesWriter` and `TimelineEntityWriter` are still registered here. So `GET /ws/v1/timeline/{type}` and `/{type}/{id}` are already written without the JAXB introspector and with nulls included, unlike domains/events/put. Either have these writers use a JAXB-configured mapper, or drop them and let the provider handle entities, so there really is one shape.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -360,7 +359,6 @@ protected ResourceConfig configure() {
     ResourceConfig config = new ResourceConfig();
     config.packages("org.apache.hadoop.yarn.server.timeline.webapp");
     config.packages("org.apache.hadoop.yarn.server.applicationhistoryservice.webapp");

Review Comment:
   With `JAXBContextResolver` deleted, these two scans no longer find anything that isn't already registered explicitly (`TimelineWebServices`, `AHSWebServices`). They cost a classpath scan at startup and would silently pick up any `@Provider` added to these packages later, which is how the resolver ended up affecting the output. Could they be dropped like the `records.writer` one?



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/JAXBContextResolver.java:
##########
@@ -1,61 +0,0 @@
-/**

Review Comment:
   Minor: this is a public class in `src/main` with no `@Private`/`@Unstable` annotation. Removing it outright could break anything downstream that registers it. Probably fine for a webapp-internal class, but worth mentioning in the release note (or deprecating first if we want to be strict).



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/timeline/webapp/TestTimelineWebServices.java:
##########
@@ -118,7 +117,7 @@ protected Application configure() {
     config.register(TimelineEventsWriter.class);
     config.register(GenericExceptionHandler.class);
     config.register(TimelinePutResponseWriter.class);
-    config.register(new JettisonFeature()).register(YarnJacksonJaxbJsonProvider.class);
+    config.register(YarnJacksonJaxbJsonProvider.class);

Review Comment:
   This still differs from production: the test registers `TimelineEventsWriter` and `TimelinePutResponseWriter` (above), which `ApplicationHistoryServer.configure()` does not. In production, events and put responses are written by `YarnJacksonJaxbJsonProvider`, including the post-`/about` root wrapping, so this test can't catch regressions on the production path. Consider making the test config match `configure()` exactly (or reusing it).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "joseluisll (via GitHub) via common-issues" <co...@hadoop.apache.org>.
joseluisll commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6533666607

   Thanks @pjfanning. Addressed in the latest commit:
   - **Wrapping and mapper races:** the provider now builds its mappers once, with a separate one for `TimelineAbout`. Two details differ from what you described. Jackson caches writers per type and annotations, so only types first written after `/about` get wrapped. And the put reader doesn't throw, because `TimelinePutResponse` ignores unknown fields: the client silently saw zero errors. The new test writes `/about` first on a fresh provider, because an earlier put on a shared server would hide the bug.
   - **Test parity:** `TestTimelineWebServices` now matches `configure()`. That exposed a separate bug: clients decoded every put error as `id=null, code=0`. `TimelinePutError` now accepts both spellings.
   - **Scans:** both removed.
   - **Docs:** `TimelineServer.md` updated, and the release note goes on the JIRA. `JAXBContextResolver` has no audience annotation, so I've kept it removed and will mention it there.
   - **Entity writers:** this is real and wider than the shape difference. Documented entity JSON is rejected with a 400, and those classes are shared with the clients, so I'd like to handle it in a separate JIRA with its own compatibility review.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "joseluisll (via GitHub) via common-issues" <co...@hadoop.apache.org>.
joseluisll commented on code in PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#discussion_r4428642640


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -371,7 +369,7 @@ protected ResourceConfig configure() {
     config.register(TimelinePutResponseReader.class);
     config.register(new JerseyBinder());
     config.register(GenericExceptionHandler.class);
-    config.register(new JettisonFeature()).register(YarnJacksonJaxbJsonProvider.class);
+    config.register(YarnJacksonJaxbJsonProvider.class);

Review Comment:
   Fixed in 8d2f4d6a301. `YarnJacksonJaxbJsonProvider` now builds its mappers once and uses a separate one for `TimelineAbout`, so it no longer changes a mapper that is in use.
   
   Two details turned out differently when I ran it. Jackson caches a writer per type and annotations, so the leak only hits types first written after `/about`. That means "call `/about`, then post" fails only if `/about` is the very first request, and an earlier put on a shared server would hide it. `TestYarnJacksonJaxbJsonProvider` uses a new provider for that reason. Also, the reader does not throw: `TimelinePutResponse` ignores unknown fields, so the client saw zero errors on a denied put.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -360,7 +359,6 @@ protected ResourceConfig configure() {
     ResourceConfig config = new ResourceConfig();
     config.packages("org.apache.hadoop.yarn.server.timeline.webapp");
     config.packages("org.apache.hadoop.yarn.server.applicationhistoryservice.webapp");
-    config.packages("org.apache.hadoop.yarn.api.records.writer");
     config.register(TimelineWebServices.class);
     config.register(AHSWebServices.class);
     config.register(TimelineEntitiesWriter.class);

Review Comment:
   Agreed, and it goes beyond the shape difference: a `POST` using the documented `entity` and `entitytype` names gets HTTP 400. I have left it out of this PR because `TimelineEntitiesWriter` is also what the v1 client, `TimelineWriter`, posts with, so the fix needs a compatibility decision of its own. It is tracked in [YARN-12052](https://issues.apache.org/jira/browse/YARN-12052), and the PR description now lists entity GETs as a known gap.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/ApplicationHistoryServer.java:
##########
@@ -360,7 +359,6 @@ protected ResourceConfig configure() {
     ResourceConfig config = new ResourceConfig();
     config.packages("org.apache.hadoop.yarn.server.timeline.webapp");
     config.packages("org.apache.hadoop.yarn.server.applicationhistoryservice.webapp");

Review Comment:
   Done in 8d2f4d6a301, both scans are removed. I checked that the only `@Path` or `@Provider` classes in those packages are `TimelineWebServices` and `AHSWebServices`, which are registered explicitly, and that there are no subpackages.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/test/java/org/apache/hadoop/yarn/server/timeline/webapp/TestTimelineWebServices.java:
##########
@@ -118,7 +117,7 @@ protected Application configure() {
     config.register(TimelineEventsWriter.class);
     config.register(GenericExceptionHandler.class);
     config.register(TimelinePutResponseWriter.class);
-    config.register(new JettisonFeature()).register(YarnJacksonJaxbJsonProvider.class);
+    config.register(YarnJacksonJaxbJsonProvider.class);

Review Comment:
   Done in 8d2f4d6a301, this config now registers the same list as `ApplicationHistoryServer.configure()`. Removing those writers exposed a real bug: the server writes `entity`, `entitytype` and `errorcode`, but the client reader only knew the camelCase names, so `testPostEntitiesWithYarnACLsEnabled` got error code 0 instead of 4. `TimelinePutError` now accepts both spellings through `@JsonAlias`. The test clients also read events and domains with the JAXB names, as the server writes them.



##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/JAXBContextResolver.java:
##########
@@ -1,61 +0,0 @@
-/**

Review Comment:
   I have kept the removal. Neither the class nor its package carries an audience annotation, so `Compatibility.md` treats it as Private and Unstable, and nothing in the repository uses it. It is mentioned in the release note on YARN-12030.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "joseluisll (via GitHub) via common-issues" <co...@hadoop.apache.org>.
joseluisll commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6560754087

   @pjfanning  @slfan1989 Ready to merge.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] YARN-12030. ApplicationHistoryServer registers only the Jackson JSON provider [hadoop]

Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #8841:
URL: https://github.com/apache/hadoop/pull/8841#issuecomment-6254148728

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   7m 23s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to include 4 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  26m 35s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 36s |  |  trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  compile  |   0m 38s |  |  trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  checkstyle  |   0m 35s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 37s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  |  trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  |  trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  spotbugs  |   0m 54s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  16m  2s |  |  branch has no errors when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 18s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 16s |  |  the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javac  |   0m 16s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 17s |  |  the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  javac  |   0m 17s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 14s |  |  hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice: The patch generated 0 new + 20 unchanged - 1 fixed = 20 total (was 21)  |
   | +1 :green_heart: |  mvnsite  |   0m 18s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 17s |  |  hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice-jdkUbuntu-21.0.12.1+1-1-24.04.4-Ubuntu with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu generated 0 new + 477 unchanged - 2 fixed = 477 total (was 479)  |
   | +1 :green_heart: |  javadoc  |   0m 16s |  |  hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-applicationhistoryservice-jdkUbuntu-17.0.20.1+1-1-24.04-Ubuntu with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu generated 0 new + 454 unchanged - 2 fixed = 454 total (was 456)  |
   | +1 :green_heart: |  spotbugs  |   0m 39s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  15m 18s |  |  patch has no errors when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   2m 56s |  |  hadoop-yarn-server-applicationhistoryservice in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 24s |  |  The patch does not generate ASF License warnings.  |
   |  |   |  77m 37s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8841 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 6006aeba20a5 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 1301185e2b4dcbfa2550dd41906ecc6f98f1e7d4 |
   | Default Java | Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
   | Multi-JDK versions | /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu |
   |  Test Results | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/1/testReport/ |
   | Max. process+thread count | 612 (vs. ulimit of 10000) |
   | modules | C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8841/1/console |
   | versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
   | Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org