hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgumas...@apache.org
Subject svn commit: r1659098 - /hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
Date Wed, 11 Feb 2015 21:29:29 GMT
Author: vgumashta
Date: Wed Feb 11 21:29:28 2015
New Revision: 1659098

URL: http://svn.apache.org/r1659098
Log:
HIVE-9621: HiveServer2 http mode - embedded jetty should use SynchronousQueue (Vaibhav Gumashta
reviewed by Thejas Nair)

Modified:
    hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java

Modified: hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java?rev=1659098&r1=1659097&r2=1659098&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
(original)
+++ hive/trunk/service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java
Wed Feb 11 21:29:28 2015
@@ -20,7 +20,7 @@ package org.apache.hive.service.cli.thri
 
 import java.util.Arrays;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 
@@ -63,9 +63,10 @@ public class ThriftHttpCLIService extend
       httpServer = new org.eclipse.jetty.server.Server();
 
       // Server thread pool
+      // Start with minWorkerThreads, expand till maxWorkerThreads and reject subsequent
requests
       String threadPoolName = "HiveServer2-HttpHandler-Pool";
       ExecutorService executorService = new ThreadPoolExecutor(minWorkerThreads, maxWorkerThreads,
-          workerKeepAliveTime, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(),
+          workerKeepAliveTime, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
           new ThreadFactoryWithGarbageCleanup(threadPoolName));
       ExecutorThreadPool threadPool = new ExecutorThreadPool(executorService);
       httpServer.setThreadPool(threadPool);



Mime
View raw message