You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "SteNicholas (via GitHub)" <gi...@apache.org> on 2026/04/21 10:10:53 UTC
[PR] [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups [celeborn]
SteNicholas opened a new pull request, #3669:
URL: https://github.com/apache/celeborn/pull/3669
### What changes were proposed in this pull request?
Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups.
Backport: https://github.com/apache/spark/pull/52719.
### Why are the changes needed?
Netty 4.2 introduces some new APIs, and deprecates some old APIs. As part of your migration to Netty 4.2, we encourage you to look through your code base for opportunities to clean up any use of deprecated APIs.
- **IoHandlerFactories for EventLoopGroups**
All transport-specific event loop groups, such as `NioEventLoopGroup`, have been deprecated. Integrators should now instead pass a transport-specific `IoHandlerFactory` to a `MultiThreadedEventLoopGroup` constructor.
Therefore, Netty 4.2 upgrade could follow the best practices from https://netty.io/wiki/netty-4.2-migration-guide.html#new-best-practices.
### Does this PR resolve a correctness bug?
No.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas closed pull request #3669: [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups
URL: https://github.com/apache/celeborn/pull/3669
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups [celeborn]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3669:
URL: https://github.com/apache/celeborn/pull/3669#discussion_r3121438357
##########
common/src/main/java/org/apache/celeborn/common/network/util/NettyUtils.java:
##########
@@ -75,23 +77,29 @@ public static EventLoopGroup createEventLoop(
IOMode mode, int numThreads, boolean conflictAvoidChooserEnable, String threadPrefix) {
ThreadFactory threadFactory = createThreadFactory(threadPrefix);
+ IoHandlerFactory handlerFactory;
switch (mode) {
case NIO:
- return conflictAvoidChooserEnable
- ? new NioEventLoopGroup(
- numThreads,
- new ThreadPerTaskExecutor(threadFactory),
- ConflictAvoidEventExecutorChooserFactory.INSTANCE,
- SelectorProvider.provider(),
- DefaultSelectStrategyFactory.INSTANCE)
- : new NioEventLoopGroup(numThreads, threadFactory);
+ handlerFactory = NioIoHandler.newFactory();
+ break;
case EPOLL:
- return new EpollEventLoopGroup(numThreads, threadFactory);
+ handlerFactory = EpollIoHandler.newFactory();
+ break;
case KQUEUE:
- return new KQueueEventLoopGroup(numThreads, threadFactory);
+ handlerFactory = KQueueIoHandler.newFactory();
+ break;
default:
throw new IllegalArgumentException("Unknown io mode: " + mode);
}
+ if (NIO.equals(mode) && conflictAvoidChooserEnable) {
Review Comment:
`mode` is an `enum`, so prefer identity comparison (`mode == NIO`) instead of `NIO.equals(mode)` for clarity and to match typical Java enum usage. If you switch to `mode == IOMode.NIO`, you can also drop the static import if desired.
```suggestion
if (mode == NIO && conflictAvoidChooserEnable) {
```
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on PR #3669:
URL: https://github.com/apache/celeborn/pull/3669#issuecomment-4294021379
Merged to main(v0.7.0).
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-2258][FOLLOWUP] Use IoHandlerFactories for EventLoopGroups to replace deprecated transport-specific event loop groups [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on PR #3669:
URL: https://github.com/apache/celeborn/pull/3669#issuecomment-4287697765
Ping @pan3793, @RexXiong.
--
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: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org