Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6A9217AE9 for ; Thu, 23 Apr 2015 20:10:17 +0000 (UTC) Received: (qmail 26884 invoked by uid 500); 23 Apr 2015 20:10:17 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 26846 invoked by uid 500); 23 Apr 2015 20:10:17 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 26836 invoked by uid 99); 23 Apr 2015 20:10:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 20:10:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 20:09:51 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 6D78824B0A for ; Thu, 23 Apr 2015 20:09:49 +0000 (UTC) Received: (qmail 24292 invoked by uid 99); 23 Apr 2015 20:09:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2015 20:09:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A18A7E17E9; Thu, 23 Apr 2015 20:09:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sevdokimov@apache.org To: commits@ignite.incubator.apache.org Date: Thu, 23 Apr 2015 20:10:08 -0000 Message-Id: <769e7b4312214b068131bfca4cdd1858@git.apache.org> In-Reply-To: <46d64ecd25564ab896de3363d198edd0@git.apache.org> References: <46d64ecd25564ab896de3363d198edd0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/50] incubator-ignite git commit: ignite-773: Implemented. X-Virus-Checked: Checked by ClamAV on apache.org ignite-773: Implemented. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/7c9fab33 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/7c9fab33 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/7c9fab33 Branch: refs/heads/ignite-709_1 Commit: 7c9fab33f0a1f163f79a9f608fd685581468e862 Parents: 8267b82 Author: Artem Shutak Authored: Wed Apr 22 18:49:37 2015 +0300 Committer: Artem Shutak Committed: Wed Apr 22 18:49:37 2015 +0300 ---------------------------------------------------------------------- .../configuration/IgniteConfiguration.java | 107 +++++++++++++++++++ .../org/apache/ignite/internal/IgnitionEx.java | 8 +- 2 files changed, 111 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c9fab33/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java index 101d8a7..252eb19 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java @@ -148,6 +148,9 @@ public class IgniteConfiguration { /** Default keep alive time for system thread pool. */ public static final long DFLT_SYSTEM_KEEP_ALIVE_TIME = 0; + /** Default keep alive time for utility thread pool. */ + public static final long DFLT_UTILITY_KEEP_ALIVE_TIME = 10_000; + /** Default max queue capacity of system thread pool. */ public static final int DFLT_SYSTEM_THREADPOOL_QUEUE_CAP = Integer.MAX_VALUE; @@ -205,6 +208,18 @@ public class IgniteConfiguration { /** IGFS pool size. */ private int igfsPoolSize = AVAILABLE_PROC_CNT; + /** Utility cache pool size. */ + private int utilityCachePoolSize = DFLT_SYSTEM_CORE_THREAD_CNT; + + /** Utility cache pool keep alive time. */ + private long utilityCacheKeepAliveTime = DFLT_UTILITY_KEEP_ALIVE_TIME; + + /** Marshaller pool size. */ + private int marshCachePoolSize = DFLT_SYSTEM_CORE_THREAD_CNT; + + /** Marshaller pool keep alive time. */ + private long marshCacheKeepAliveTime = DFLT_UTILITY_KEEP_ALIVE_TIME; + /** P2P pool size. */ private int p2pPoolSize = DFLT_P2P_THREAD_CNT; @@ -442,6 +457,8 @@ public class IgniteConfiguration { lsnrs = cfg.getLocalEventListeners(); marsh = cfg.getMarshaller(); marshLocJobs = cfg.isMarshalLocalJobs(); + marshCacheKeepAliveTime = cfg.getMarshallerCacheKeepAliveTime(); + marshCachePoolSize = cfg.getMarshallerCacheThreadPoolSize(); mbeanSrv = cfg.getMBeanServer(); metricsHistSize = cfg.getMetricsHistorySize(); metricsExpTime = cfg.getMetricsExpireTime(); @@ -467,6 +484,8 @@ public class IgniteConfiguration { timeSrvPortRange = cfg.getTimeServerPortRange(); txCfg = cfg.getTransactionConfiguration(); userAttrs = cfg.getUserAttributes(); + utilityCacheKeepAliveTime = cfg.getUtilityCacheKeepAliveTime(); + utilityCachePoolSize = cfg.getUtilityCacheThreadPoolSize(); waitForSegOnStart = cfg.isWaitForSegmentOnStart(); warmupClos = cfg.getWarmupClosure(); } @@ -648,6 +667,50 @@ public class IgniteConfiguration { } /** + * Default size of thread pool that is in charge of processing utility cache messages. + *

+ * If not provided, executor service will have size {@link #DFLT_SYSTEM_CORE_THREAD_CNT}. + * + * @return Default thread pool size to be used in grid for utility cache messages. + */ + public int getUtilityCacheThreadPoolSize() { + return utilityCachePoolSize; + } + + /** + * Keep alive time of thread pool that is in charge of processing utility cache messages. + *

+ * If not provided, executor service will have keep alive time {@link #DFLT_UTILITY_KEEP_ALIVE_TIME}. + * + * @return Thread pool keep alive time (in milliseconds) to be used in grid for utility cache messages. + */ + public long getUtilityCacheKeepAliveTime() { + return utilityCacheKeepAliveTime; + } + + /** + * Default size of thread pool that is in charge of processing marshaller messages. + *

+ * If not provided, executor service will have size {@link #DFLT_SYSTEM_CORE_THREAD_CNT}. + * + * @return Default thread pool size to be used in grid for marshaller messages. + */ + public int getMarshallerCacheThreadPoolSize() { + return marshCachePoolSize; + } + + /** + * Keep alive time of thread pool that is in charge of processing marshaller messages. + *

+ * If not provided, executor service will have keep alive time {@link #DFLT_UTILITY_KEEP_ALIVE_TIME}. + * + * @return Thread pool keep alive time (in milliseconds) to be used in grid for marshaller messages. + */ + public long getMarshallerCacheKeepAliveTime() { + return marshCacheKeepAliveTime; + } + + /** * Sets thread pool size to use within grid. * * @param poolSize Thread pool size to use within grid. @@ -698,6 +761,50 @@ public class IgniteConfiguration { } /** + * Sets default thread pool size that will be used to process utility cache messages. + * + * @param poolSize Default executor service size to use for utility cache messages. + * @see IgniteConfiguration#getUtilityCacheThreadPoolSize() + * @see IgniteConfiguration#getUtilityCacheKeepAliveTime() + */ + public void setUtilityCachePoolSize(int poolSize) { + utilityCachePoolSize = poolSize; + } + + /** + * Sets keep alive time of thread pool size that will be used to process utility cache messages. + * + * @param keepAliveTime Keep alive time of executor service to use for utility cache messages. + * @see IgniteConfiguration#getUtilityCacheThreadPoolSize() + * @see IgniteConfiguration#getUtilityCacheKeepAliveTime() + */ + public void setUtilityCacheKeepAliveTime(long keepAliveTime) { + utilityCacheKeepAliveTime = keepAliveTime; + } + + /** + * Sets default thread pool size that will be used to process marshaller messages. + * + * @param poolSize Default executor service size to use for marshaller messages. + * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize() + * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime() + */ + public void setMarshallerCachePoolSize(int poolSize) { + marshCachePoolSize = poolSize; + } + + /** + * Sets maximum thread pool size that will be used to process marshaller messages. + * + * @param keepAliveTime Keep alive time of executor service to use for marshaller messages. + * @see IgniteConfiguration#getMarshallerCacheThreadPoolSize() + * @see IgniteConfiguration#getMarshallerCacheKeepAliveTime() + */ + public void setMarshallerCacheKeepAliveTime(long keepAliveTime) { + marshCacheKeepAliveTime = keepAliveTime; + } + + /** * Should return Ignite installation home folder. If not provided, the system will check * {@code IGNITE_HOME} system property and environment variable in that order. If * {@code IGNITE_HOME} still could not be obtained, then grid will not start and exception http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c9fab33/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java index ac9bc33..56ec3ae 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java @@ -1418,16 +1418,16 @@ public class IgnitionEx { utilityCacheExecSvc = new IgniteThreadPoolExecutor( "utility-" + cfg.getGridName(), - DFLT_SYSTEM_CORE_THREAD_CNT, + myCfg.getUtilityCacheThreadPoolSize(), DFLT_SYSTEM_MAX_THREAD_CNT, - DFLT_SYSTEM_KEEP_ALIVE_TIME, + myCfg.getUtilityCacheKeepAliveTime(), new LinkedBlockingQueue(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP)); marshCacheExecSvc = new IgniteThreadPoolExecutor( "marshaller-cache-" + cfg.getGridName(), - DFLT_SYSTEM_CORE_THREAD_CNT, + myCfg.getMarshallerCacheThreadPoolSize(), DFLT_SYSTEM_MAX_THREAD_CNT, - DFLT_SYSTEM_KEEP_ALIVE_TIME, + myCfg.getMarshallerCacheKeepAliveTime(), new LinkedBlockingQueue(DFLT_SYSTEM_THREADPOOL_QUEUE_CAP)); // Register Ignite MBean for current grid instance.