You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ar...@apache.org on 2018/01/02 14:50:18 UTC

[6/7] drill git commit: DRILL-5994: Added webserver maxThreads configuration option to enable launching on a machine with more than 200 cores

DRILL-5994: Added webserver maxThreads configuration option to enable launching on a machine with more than 200 cores

closes #1069


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/ce80da85
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/ce80da85
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/ce80da85

Branch: refs/heads/master
Commit: ce80da857d1b28af7619f8402ffe1e4e3c833e1c
Parents: 3df11e1
Author: mitchel <mi...@hotmail.com>
Authored: Tue Dec 12 10:27:19 2017 -0500
Committer: Arina Ielchiieva <ar...@gmail.com>
Committed: Tue Jan 2 15:53:57 2018 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/drill/exec/ExecConstants.java       | 1 +
 .../main/java/org/apache/drill/exec/server/rest/WebServer.java   | 3 ++-
 exec/java-exec/src/main/resources/drill-module.conf              | 4 +++-
 3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ce80da85/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
index 5059b4f..d155466 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ExecConstants.java
@@ -167,6 +167,7 @@ public final class ExecConstants {
   public static final String USE_LOGIN_PRINCIPAL = "drill.exec.security.bit.auth.use_login_principal";
   public static final String USER_ENCRYPTION_SASL_ENABLED = "drill.exec.security.user.encryption.sasl.enabled";
   public static final String USER_ENCRYPTION_SASL_MAX_WRAPPED_SIZE = "drill.exec.security.user.encryption.sasl.max_wrapped_size";
+  public static final String WEB_SERVER_THREAD_POOL_MAX = "drill.exec.web_server.thread_pool_max";
 
   public static final String USER_SSL_ENABLED = "drill.exec.security.user.encryption.ssl.enabled";
   public static final String BIT_ENCRYPTION_SASL_ENABLED = "drill.exec.security.bit.encryption.sasl.enabled";

http://git-wip-us.apache.org/repos/asf/drill/blob/ce80da85/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
index c702314..4566e7d 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/WebServer.java
@@ -67,6 +67,7 @@ import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.servlets.CrossOriginFilter;
 import org.eclipse.jetty.util.resource.Resource;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
+import org.eclipse.jetty.util.thread.QueuedThreadPool;
 import org.glassfish.jersey.servlet.ServletContainer;
 import org.joda.time.DateTime;
 
@@ -158,7 +159,7 @@ public class WebServer implements AutoCloseable {
     int retry = 0;
 
     for (; retry < PORT_HUNT_TRIES; retry++) {
-      embeddedJetty = new Server();
+      embeddedJetty = new Server(new QueuedThreadPool(config.getInt(ExecConstants.WEB_SERVER_THREAD_POOL_MAX)));
       embeddedJetty.setHandler(createServletContextHandler(authEnabled));
       embeddedJetty.addConnector(createConnector(port));
 

http://git-wip-us.apache.org/repos/asf/drill/blob/ce80da85/exec/java-exec/src/main/resources/drill-module.conf
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/resources/drill-module.conf b/exec/java-exec/src/main/resources/drill-module.conf
index cb66ca3..97ac19d 100644
--- a/exec/java-exec/src/main/resources/drill-module.conf
+++ b/exec/java-exec/src/main/resources/drill-module.conf
@@ -379,7 +379,9 @@ drill.exec: {
   # refresh time.
   grace_period_ms : 0,
   //port hunting for drillbits. Enabled only for testing purposes.
-  port_hunt : false
+  port_hunt : false,
+  // Max threads of embedded Jetty
+  web_server.thread_pool_max: 200
 
 }