From bc5947bfa36038d497a4481444dde3ee7097b44c Mon Sep 17 00:00:00 2001 From: aching <> Date: Fri, 29 Jun 2012 15:22:40 -0700 Subject: [PATCH] NioServerSocketChannelFactory needs the maximum number of worker threads. Summary: The worker thread factory had enough maximum threads, but netty assumes number of cores * 2. This is likely not adequate for our clusters. Test Plan: Passed all corona unittests. Reviewers: dms, rvadali, pyang Reviewed By: rvadali CC: mattwkelly Task ID: 1152668 --- src/core/org/apache/hadoop/http/NettyMapOutputHttpServer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/org/apache/hadoop/http/NettyMapOutputHttpServer.java b/src/core/org/apache/hadoop/http/NettyMapOutputHttpServer.java index db506152..5c12d624 100644 --- a/src/core/org/apache/hadoop/http/NettyMapOutputHttpServer.java +++ b/src/core/org/apache/hadoop/http/NettyMapOutputHttpServer.java @@ -91,9 +91,11 @@ public synchronized void init(Configuration conf) { } catch (ClassCastException e) { LOG.warn("Netty worker thread pool is not of type ThreadPoolExecutor", e); } + LOG.info("Netty starting up with a maximum of " + maximumPoolSize + + " worker threads"); channelFactory = new NioServerSocketChannelFactory( Executors.newCachedThreadPool(bossFactory), - workerThreadPool); + workerThreadPool, maximumPoolSize); } public synchronized int start(ChannelPipelineFactory pipelineFactory) {