Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setSystemThreadPoolSize()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#setSystemThreadPoolSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GridCachePreloadLifecycleAbstractTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); c.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); c.setIncludeProperties(); c.setDeploymentMode(DeploymentMode.SHARED); c.setNetworkTimeout(10000); c.setConnectorConfiguration(null); // c.setPeerClassLoadingLocalClassPathExclude(GridCachePreloadLifecycleAbstractTest.class.getName(), // MyValue.class.getName()); c.setPublicThreadPoolSize(10); c.setSystemThreadPoolSize(10); c.setPeerClassLoadingThreadPoolSize(3); c.setLifecycleBeans(lifecycleBean); return c; }
Example 2
Source File: IgniteCacheStarvationOnRebalanceTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); // Use small system thread pool to reproduce the issue. cfg.setSystemThreadPoolSize(IGNITE_THREAD_POOL_SIZE); cfg.setMarshaller(new BinaryMarshaller()); return cfg; }
Example 3
Source File: CacheConcurrentReadThroughTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); if (!cfg.isClientMode()) { cfg.setPublicThreadPoolSize(SYS_THREADS); cfg.setSystemThreadPoolSize(SYS_THREADS); } return cfg; }
Example 4
Source File: CacheParallelStartTest.java From ignite with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setSystemThreadPoolSize(Runtime.getRuntime().availableProcessors() * 3); long sz = 512 * 1024 * 1024; DataStorageConfiguration memCfg = new DataStorageConfiguration().setPageSize(1024) .setDefaultDataRegionConfiguration( new DataRegionConfiguration() .setPersistenceEnabled(false) .setInitialSize(sz) .setMaxSize(sz) ) .setWalMode(WALMode.LOG_ONLY).setCheckpointFrequency(24L * 60 * 60 * 1000); cfg.setDataStorageConfiguration(memCfg); ArrayList<Object> staticCaches = new ArrayList<>(CACHES_COUNT); for (int i = 0; i < CACHES_COUNT; i++) staticCaches.add(cacheConfiguration(STATIC_CACHE_PREFIX, i)); cfg.setCacheConfiguration(staticCaches.toArray(new CacheConfiguration[CACHES_COUNT])); return cfg; }
Example 5
Source File: IgfsBlockMessageSystemPoolStarvationSelfTest.java From ignite with Apache License 2.0 | 4 votes |
/** * Create node configuration. * * @param name Node name. * @param ipFinder IpFinder. * @return Configuration. * @throws Exception If failed. */ private IgniteConfiguration config(String name, TcpDiscoveryVmIpFinder ipFinder) throws Exception { // Data cache configuration. CacheConfiguration dataCcfg = new CacheConfiguration(DEFAULT_CACHE_NAME); dataCcfg.setCacheMode(CacheMode.REPLICATED); dataCcfg.setAtomicityMode(TRANSACTIONAL); dataCcfg.setWriteSynchronizationMode(FULL_SYNC); dataCcfg.setAffinityMapper(new DummyAffinityMapper(1)); dataCcfg.setMaxConcurrentAsyncOperations(1); // Meta cache configuration. CacheConfiguration metaCcfg = new CacheConfiguration(DEFAULT_CACHE_NAME); metaCcfg.setCacheMode(CacheMode.REPLICATED); metaCcfg.setAtomicityMode(TRANSACTIONAL); metaCcfg.setWriteSynchronizationMode(FULL_SYNC); // File system configuration. FileSystemConfiguration igfsCfg = new FileSystemConfiguration(); igfsCfg.setDefaultMode(IgfsMode.PRIMARY); igfsCfg.setFragmentizerEnabled(false); igfsCfg.setBlockSize(1024); igfsCfg.setDataCacheConfiguration(dataCcfg); igfsCfg.setMetaCacheConfiguration(metaCcfg); igfsCfg.setName(IGFS_NAME); // Ignite configuration. IgniteConfiguration cfg = getConfiguration(name); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(ipFinder); cfg.setDiscoverySpi(discoSpi); cfg.setFileSystemConfiguration(igfsCfg); cfg.setLocalHost("127.0.0.1"); cfg.setConnectorConfiguration(null); cfg.setStripedPoolSize(2); cfg.setSystemThreadPoolSize(2); cfg.setRebalanceThreadPoolSize(1); cfg.setPublicThreadPoolSize(1); return cfg; }
Example 6
Source File: GridCacheDhtPreloadPerformanceTest.java From ignite with Apache License 2.0 | 4 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); CacheConfiguration cc = defaultCacheConfiguration(); cc.setCacheMode( CacheMode.PARTITIONED); cc.setWriteSynchronizationMode( CacheWriteSynchronizationMode.FULL_SYNC); cc.setRebalanceMode( CacheRebalanceMode.SYNC); cc.setAffinity(new RendezvousAffinityFunction(false, 1300)); cc.setBackups(2); CacheConfiguration cc1 = defaultCacheConfiguration(); cc1.setName("cc1"); cc1.setCacheMode( CacheMode.PARTITIONED); cc1.setWriteSynchronizationMode( CacheWriteSynchronizationMode.FULL_SYNC); cc1.setRebalanceMode( CacheRebalanceMode.SYNC); cc1.setAffinity( new RendezvousAffinityFunction( false, 1300)); cc1.setBackups(2); c.setIgfsThreadPoolSize(1); c.setSystemThreadPoolSize(2); c.setPublicThreadPoolSize(2); c.setManagementThreadPoolSize(1); c.setUtilityCachePoolSize(2); c.setPeerClassLoadingThreadPoolSize(1); c.setCacheConfiguration(cc, cc1); TcpCommunicationSpi comm = new TcpCommunicationSpi(); comm.setSharedMemoryPort(-1); c.setCommunicationSpi(comm); return c; }
Example 7
Source File: CacheContinuousQueryOperationFromCallbackTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setSystemThreadPoolSize(SYSTEM_POOL_SIZE); ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); MemoryEventStorageSpi storeSpi = new MemoryEventStorageSpi(); storeSpi.setExpireCount(100); cfg.setEventStorageSpi(storeSpi); return cfg; }
Example 8
Source File: GridCacheQueueMultiNodeAbstractSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setPublicThreadPoolSize(RETRIES * 2); cfg.setSystemThreadPoolSize(RETRIES * 2); cfg.setConnectorConfiguration(null); return cfg; }