You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2014/12/31 16:47:04 UTC
incubator-nifi git commit: NIFI-59: - Adding a property to specify
the size of the Jetty thread pool.
Repository: incubator-nifi
Updated Branches:
refs/heads/develop ebf3cdc77 -> 3c5bb5638
NIFI-59:
- Adding a property to specify the size of the Jetty thread pool.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/3c5bb563
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3c5bb563
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3c5bb563
Branch: refs/heads/develop
Commit: 3c5bb56386e559886d8aa1a3ee447e6b39f2d2d7
Parents: ebf3cdc
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Dec 31 10:42:42 2014 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Dec 31 10:42:42 2014 -0500
----------------------------------------------------------------------
assembly/pom.xml | 1 +
.../src/main/java/org/apache/nifi/util/NiFiProperties.java | 6 ++++++
.../resources/src/main/resources/conf/nifi.properties | 1 +
.../src/main/java/org/apache/nifi/web/server/JettyServer.java | 2 +-
4 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3c5bb563/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
index 5a3f263..ae74485 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -294,6 +294,7 @@
<nifi.web.https.host />
<nifi.web.https.port />
<nifi.jetty.work.dir>./work/jetty</nifi.jetty.work.dir>
+ <nifi.web.jetty.threads>200</nifi.web.jetty.threads>
<!-- nifi.properties: security properties -->
<nifi.security.keystore />
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3c5bb563/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
----------------------------------------------------------------------
diff --git a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
index ddceb18..10e348d 100644
--- a/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
+++ b/commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
@@ -137,6 +137,7 @@ public class NiFiProperties extends Properties {
public static final String WEB_HTTPS_PORT = "nifi.web.https.port";
public static final String WEB_HTTPS_HOST = "nifi.web.https.host";
public static final String WEB_WORKING_DIR = "nifi.web.jetty.working.directory";
+ public static final String WEB_THREADS = "nifi.web.jetty.threads";
// ui properties
public static final String UI_BANNER_TEXT = "nifi.ui.banner.text";
@@ -182,6 +183,7 @@ public class NiFiProperties extends Properties {
public static final String DEFAULT_USER_CREDENTIAL_CACHE_DURATION = "24 hours";
public static final Integer DEFAULT_REMOTE_INPUT_PORT = null;
public static final Path DEFAULT_TEMPLATE_DIRECTORY = Paths.get("conf", "templates");
+ public static final int DEFAULT_WEB_THREADS = 200;
public static final String DEFAULT_WEB_WORKING_DIR = "./work/jetty";
public static final String DEFAULT_NAR_WORKING_DIR = "./work/nar";
public static final String DEFAULT_COMPONENT_DOCS_DIRECTORY = "./work/docs/components";
@@ -499,6 +501,10 @@ public class NiFiProperties extends Properties {
return sslPort;
}
+ public int getWebThreads() {
+ return getIntegerProperty(WEB_THREADS, DEFAULT_WEB_THREADS);
+ }
+
public File getWebWorkingDirectory() {
return new File(getProperty(WEB_WORKING_DIR, DEFAULT_WEB_WORKING_DIR));
}
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3c5bb563/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/nifi.properties
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/nifi.properties b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/nifi.properties
index 248c0b9..d6ae2bf 100644
--- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/nifi.properties
+++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/conf/nifi.properties
@@ -102,6 +102,7 @@ nifi.web.http.port=${nifi.web.http.port}
nifi.web.https.host=${nifi.web.https.host}
nifi.web.https.port=${nifi.web.https.port}
nifi.web.jetty.working.directory=${nifi.jetty.work.dir}
+nifi.web.jetty.threads=${nifi.web.jetty.threads}
# security properties #
nifi.sensitive.props.key=
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3c5bb563/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
index 5d37090..95052a7 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
+++ b/nar-bundles/framework-bundle/framework/web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
@@ -108,7 +108,7 @@ public class JettyServer implements NiFiServer {
* @param props the configuration
*/
public JettyServer(final NiFiProperties props) {
- final QueuedThreadPool threadPool = new QueuedThreadPool();
+ final QueuedThreadPool threadPool = new QueuedThreadPool(props.getWebThreads());
threadPool.setName("NiFi Web Server");
// create the server