Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setPublicThreadPoolSize()
The following examples show how to use
org.apache.ignite.configuration.IgniteConfiguration#setPublicThreadPoolSize() .
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: LargeEntryUpdateTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setPublicThreadPoolSize(THREAD_COUNT); DataStorageConfiguration mem = new DataStorageConfiguration(); mem.setPageSize(PAGE_SIZE); cfg.setDataStorageConfiguration(mem); CacheConfiguration[] ccfgs = new CacheConfiguration[CACHE_COUNT]; for (int i = 0; i < CACHE_COUNT; ++i) { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setName(CACHE_PREFIX + i); ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); ccfg.setCacheMode(CacheMode.PARTITIONED); ccfgs[i] = ccfg; } cfg.setCacheConfiguration(ccfgs); return cfg; }
Example 3
Source File: IgnitePdsTaskCancelingTest.java From ignite with Apache License 2.0 | 6 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); cfg.setFailureHandler(new AbstractFailureHandler() { @Override protected boolean handle(Ignite ignite, FailureContext failureCtx) { failure.set(true); return true; } }); cfg.setCacheConfiguration(new CacheConfiguration().setName(DEFAULT_CACHE_NAME).setAffinity( new RendezvousAffinityFunction(false, NUM_TASKS / 2) )); cfg.setDataStorageConfiguration(getDataStorageConfiguration()); // Set the thread pool size according to the NUM_TASKS. cfg.setPublicThreadPoolSize(16); return cfg; }
Example 4
Source File: GridEventStorageCheckAllEventsSelfTest.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration() throws Exception { IgniteConfiguration cfg = super.getConfiguration(); // TODO: IGNITE-3099 (hotfix the test to check the event order in common case). cfg.setPublicThreadPoolSize(1); cfg.setIncludeEventTypes(EventType.EVTS_ALL); return cfg; }
Example 5
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 6
Source File: IgniteComputeCustomExecutorSelfTest.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.setExecutorConfiguration(createExecConfiguration(EXEC_NAME0), createExecConfiguration(EXEC_NAME1)); cfg.setPublicThreadPoolSize(1); CacheConfiguration ccfg = new CacheConfiguration(); ccfg.setName(CACHE_NAME); cfg.setCacheConfiguration(ccfg); return cfg; }
Example 7
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 8
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 9
Source File: PublicThreadpoolStarvationTest.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(1); ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); cfg.setMarshaller(new BinaryMarshaller()); return cfg; }
Example 10
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; }
Example 11
Source File: GridCachePartitionedAtomicSequenceTxSelfTest.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(THREAD_NUM); AtomicConfiguration atomicCfg = atomicConfiguration(); assertNotNull(atomicCfg); cfg.setAtomicConfiguration(atomicCfg); return cfg; }
Example 12
Source File: GridSingleSplitsNewNodesAbstractLoadTest.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.setCommunicationSpi(new TcpCommunicationSpi()); cfg.setDiscoverySpi(getDiscoverySpi(cfg)); cfg.setMetricsHistorySize(1000); cfg.setPublicThreadPoolSize(100); return cfg; }
Example 13
Source File: GridSessionSetJobAttributeWaitListenerSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * 2); return c; }
Example 14
Source File: GridSessionCancelSiblingsFromFutureSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }
Example 15
Source File: GridSessionCancelSiblingsFromTaskSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }
Example 16
Source File: GridCancelUnusedJobSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT); return c; }
Example 17
Source File: GridSessionJobWaitTaskAttributeSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }
Example 18
Source File: GridSessionSetFutureAttributeSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }
Example 19
Source File: GridSessionSetJobAttributeSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }
Example 20
Source File: GridSessionCancelSiblingsFromJobSelfTest.java From ignite with Apache License 2.0 | 3 votes |
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); c.setDiscoverySpi(discoSpi); c.setPublicThreadPoolSize(SPLIT_COUNT * EXEC_COUNT); return c; }