Source:
<code>BookieNettyServer(ServerConfiguration conf, RequestProcessor processor) throws IOException, KeeperException, InterruptedException, BookieException { this.conf = conf; this.requestProcessor = processor; ExtensionRegistry registry = ExtensionRegistry.newInstance(); authProviderFactory = AuthProviderFactoryFactory.newBookieAuthProviderFactory(conf); responseEncoder = new BookieProtoEncoding.ResponseEncoder(registry); requestDecoder = new BookieProtoEncoding.RequestDecoder(registry); if (!conf.isDisableServerSocketBind()) { ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("bookie-io-%s").build(); final int numThreads = Runtime.getRuntime().availableProcessors() * 2; EventLoopGroup eventLoopGroup; if (SystemUtils.IS_OS_LINUX) { try { eventLoopGroup = new EpollEventLoopGroup(numThreads, threadFactory); <START> } catch (Throwable t) { <END> LOG.warn("Could not use Netty Epoll event loop for bookie server: {}", t.getMessage()); eventLoopGroup = new NioEventLoopGroup(numThreads, threadFactory); } } else { eventLoopGroup = new NioEventLoopGroup(numThreads, threadFactory); } this.eventLoopGroup = eventLoopGroup; allChannels = new CleanupChannelGroup(eventLoopGroup); } else { this.eventLoopGroup = null; } if (conf.isEnableLocalTransport()) { jvmEventLoopGroup = new DefaultEventLoopGroup(); allChannels = new CleanupChannelGroup(jvmEventLoopGroup); } else { jvmEventLoopGroup = null; } bookieAddress = Bookie.getBookieAddress(conf); InetSocketAddress bindAddress; if (conf.getListeningInterface() == null) { bindAddress = new InetSocketAddress(conf.getBookiePort()); } else { bindAddress = bookieAddress.getSocketAddress(); } listenOn(bindAddress, bookieAddress); }</code><technical_language>Catching Throwable a bit nervous. lots of Exceptions/Errors want fall Nio for. restrict UnsatisfiedLinkError</technical_language>

Target:
BookieNettyServer(ServerConfiguration conf, RequestProcessor processor) throws IOException, KeeperException, InterruptedException, BookieException { this.maxFrameSize = conf.getNettyMaxFrameSizeBytes(); this.conf = conf; this.requestProcessor = processor; ExtensionRegistry registry = ExtensionRegistry.newInstance(); authProviderFactory = AuthProviderFactoryFactory.newBookieAuthProviderFactory(conf); responseEncoder = new BookieProtoEncoding.ResponseEncoder(registry); requestDecoder = new BookieProtoEncoding.RequestDecoder(registry); if (!conf.isDisableServerSocketBind()) { ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("bookie-io-%s").build(); final int numThreads = Runtime.getRuntime().availableProcessors() * 2; EventLoopGroup eventLoopGroup; if (SystemUtils.IS_OS_LINUX) { try { eventLoopGroup = new EpollEventLoopGroup(numThreads, threadFactory); } catch (ExceptionInInitializerError | NoClassDefFoundError | UnsatisfiedLinkError e) { LOG.warn("Could not use Netty Epoll event loop for bookie server: {}", e.getMessage()); eventLoopGroup = new NioEventLoopGroup(numThreads, threadFactory); } } else { eventLoopGroup = new NioEventLoopGroup(numThreads, threadFactory); } this.eventLoopGroup = eventLoopGroup; allChannels = new CleanupChannelGroup(eventLoopGroup); } else { this.eventLoopGroup = null; } if (conf.isEnableLocalTransport()) { jvmEventLoopGroup = new DefaultEventLoopGroup(); allChannels = new CleanupChannelGroup(jvmEventLoopGroup); } else { jvmEventLoopGroup = null; } bookieAddress = Bookie.getBookieAddress(conf); InetSocketAddress bindAddress; if (conf.getListeningInterface() == null) { bindAddress = new InetSocketAddress(conf.getBookiePort()); } else { bindAddress = bookieAddress.getSocketAddress(); } listenOn(bindAddress, bookieAddress); }