Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finagle-netty4: Avoid NoClassDefFoundError if netty-transport-native-…
…epoll is excluded Problem Currently Finagle fails at startup when netty-transport-native-epoll is not available on the classpath. Even on OS X, or if epoll is explicitly disabled. (If I have seen correctly it is even disabled by default here: finagle/finagle-netty4/src/main/resources/com/twitter/toggles/configs/com.twitter.finagle.netty4.json Lines 3 to 7 in 835b6c3 "id": "com.twitter.finagle.netty4.UseNativeEpollV2", "description": "Enable native epoll transport for netty4. Requires linux-x86_64", "fraction": 0.0 ) Solution The solution is to move the creation of the different EventLoopGroups into own methods with an explicit type signature returning just EventLoopGroup. Result As a result it should be possible to exclude netty-transport-native-epoll from the classpath and therefore reduce the size of the bundle. Side note: I see that I didn't add any tests. Unfortunately my sbt know how is not existing, so I don't know how to set up separate tests with different dependencies. Signed-off-by: Isabel Martin <imartin@twitter.com> JIRA Issues: CSL-6407 Differential Revision: https://phabricator.twitter.biz/D172924
- Loading branch information
1 parent
6534e45
commit 940809a
Showing
3 changed files
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters