joseluisll opened a new pull request, #8751:
URL: https://github.com/apache/hadoop/pull/8751
### Description of PR
`JobEndNotifier` imports `org.eclipse.jetty.util.log.Log` and makes 14
`Log.getLog().info(...)` / `.warn(...)` calls. It is the only class under any
`src/main` in the whole Hadoop tree that still uses Jetty's logging facade.
This replaces it with a standard SLF4J `Logger` and converts every call site
from string concatenation to `{}` placeholder style, keeping the existing
trailing-exception argument form where an exception was already being logged
(e.g. `LOG.warn("Job end notification to {} failed", urlToNotify, ioe)`).
It also fixes a pre-existing missing space in one of the warnings, which
rendered as `couldn't parse configuredproxy's port`.
No pom change is needed: `hadoop-mapreduce-client/pom.xml`, the module's
parent, already declares `org.slf4j:slf4j-api`, so
`hadoop-mapreduce-client-app` inherits it. After this change the module's main
sources reference no `org.eclipse.jetty` type at all.
Split out of #8699 at @pan3793's request, and deliberately kept to this one
class so that it is straightforward to backport. Eight test classes elsewhere
(in hadoop-common, hadoop-yarn-client,
hadoop-yarn-server-applicationhistoryservice and
hadoop-yarn-server-resourcemanager) still use the same Jetty facade; those are
out of scope here.
### How was this patch tested?
Built and tested locally on Windows with Temurin JDK 21, using `-P
'!native-win'`:
- `mvnw -B -DskipTests -P '!native-win' install -pl
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app
-am` — BUILD SUCCESS.
- `mvnw -B -P '!native-win' test -Dtest=TestJobEndNotifier -pl
.../hadoop-mapreduce-client-app` — 7 tests run, 4 errors. The three tests that
exercise `JobEndNotifier` directly (`checkConfiguration`, `testNotifyRetries`,
`testCustomNotifierClass`) pass. The other four are `MRApp`-based and error
with `YarnRuntimeException: Error creating staging dir`, caused by
`FileNotFoundException: Hadoop bin directory does not exist` — i.e. missing
`winutils.exe`, a consequence of skipping the `native-win` profile. I ran the
same command against the unmodified file on trunk and got exactly the same four
errors with the same cause, so this is a pre-existing local environment
limitation and not a regression. Full test coverage is left to CI on Linux.
- `mvnw -B -P '!native-win' checkstyle:check` on the module: the file
reports only pre-existing violations on untouched code (the `protected` fields,
the leading-comma continuations, the `proxyConf` indentation, the `} else {`).
No violation falls on a changed line, and no changed line exceeds 80 characters.
### 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.*
- [ ] 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)? *No new
dependencies; slf4j-api is already on the module classpath.*
- [ ] 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 Claude"
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.
🤖 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]