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:09 UTC

[PR] YARN-12024. Distributed shell cannot be submitted through the YARN Router: getResourceProfiles hides YARNFeatureNotEnabledException. [hadoop]

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

   ### Description of PR
   
   JIRA: https://issues.apache.org/jira/browse/YARN-12024
   
   Resource profiles are disabled by default, so each RM's `getResourceProfiles` and `getResourceProfile` throw `YARNFeatureNotEnabledException`. That exception is part of the API contract: the distributed shell `Client` catches it and carries on without profiles. Through the Router the client gets a plain `YarnException` instead, so the submission fails.
   
   The type is lost in two places:
   
   - `FederationClientInterceptor#invokeConcurrent` replaces the per-sub-cluster failures with `new YarnException("invokeConcurrent Failed = " + ...)`, which has no cause. Callers can't recover the original exception.
   - `getResourceProfiles` and `getResourceProfile` wrap whatever `invokeConcurrent` throws in another `YarnException` via `RouterServerUtil.logAndThrowException`.
   
   Changes:
   
   - `invokeConcurrent` throws `YARNFeatureNotEnabledException`, with the same message, when every failed sub-cluster reported it. Failures that are mixed with other errors are still reported as a plain `YarnException`.
   - `getResourceProfiles` and `getResourceProfile` record the failure metric and audit log as before, then rethrow `YARNFeatureNotEnabledException` without wrapping it.
   - New `TestFederationClientInterceptorProfilesDisabled` runs the interceptor against two MockRM sub-clusters with profiles disabled. `TestableFederationClientInterceptor` can't be used for this: its MockRMs read the module's test `yarn-site.xml` in their constructor, which enables profiles.
   
   ### How was this patch tested?
   
   On Ubuntu 24.04 (WSL2), OpenJDK 17, Maven 3.9.16:
   
   - `mvn -pl hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router -am test -Dtest='TestFederationClientInterceptorProfilesDisabled,TestFederationClientInterceptor,TestFederationClientInterceptorRetry' -Dsurefire.failIfNoSpecifiedTests=false -Dmaven.test.failure.ignore=false`: 78 tests run, 0 failures, 0 errors, 2 skipped (both skips are already on trunk).
   - With the `FederationClientInterceptor` change reverted, `TestFederationClientInterceptorProfilesDisabled#testRouterReportsFeatureNotEnabled` fails with `expected: <org.apache.hadoop.yarn.exceptions.YARNFeatureNotEnabledException> but was: <org.apache.hadoop.yarn.exceptions.YarnException>`.
   - Checkstyle: no violations on the changed files.
   
   ### 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? (Not applicable: no object storage changes.)
   - [ ] 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)? (Not applicable: no new dependencies.)
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? (Not applicable.)
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [x] The PR includes the phrase "Contains content generated by <tool>"
         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-12024. Distributed shell cannot be submitted through the YARN Router: getResourceProfiles hides YARNFeatureNotEnabledException. [hadoop]

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

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 24s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  1s |  |  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 1 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  29m  1s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 34s |  |  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 37s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 42s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 40s |  |  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 56s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  17m 52s |  |  branch has no errors when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 19s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 18s |  |  the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javac  |   0m 18s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 19s |  |  the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  javac  |   0m 19s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 15s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 16s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 17s |  |  the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu  |
   | +1 :green_heart: |  javadoc  |   0m 18s |  |  the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu  |
   | +1 :green_heart: |  spotbugs  |   0m 41s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  15m  8s |  |  patch has no errors when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   9m  1s |  |  hadoop-yarn-server-router in the patch passed.  |
   | +1 :green_heart: |  asflicense  |   0m 24s |  |  The patch does not generate ASF License warnings.  |
   |  |   |  80m 55s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8840/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8840 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux e2c57f67c2c4 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 / cf597d2340f3ed1a442262c723c93e0a3edc8666 |
   | 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-8840/1/testReport/ |
   | Max. process+thread count | 1320 (vs. ulimit of 10000) |
   | modules | C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8840/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


Re: [PR] YARN-12024. Distributed shell cannot be submitted through the YARN Router: getResourceProfiles hides YARNFeatureNotEnabledException. [hadoop]

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

   @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