/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(inclEvtTypes); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); int[] evts = new int[EVTS_ALL.length + 1]; evts[0] = Integer.MAX_VALUE - 1; System.arraycopy(EVTS_ALL, 0, evts, 1, EVTS_ALL.length); cfg.setIncludeEventTypes(evts); return cfg; }
/** * @param cfg Config. */ private void registerLeftEvent(IgniteConfiguration cfg) { int[] evts = {EVT_NODE_LEFT}; cfg.setIncludeEventTypes(evts); Map<IgnitePredicate<? extends Event>, int[]> lsnrs = new HashMap<>(); lsnrs.put((IgnitePredicate<Event>)event -> { WAIT_ON_SUPPLY_MESSAGE_FAILURE.countDown(); return true; }, evts); cfg.setLocalEventListeners(lsnrs); }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(EventType.EVT_CACHE_OBJECT_PUT); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(EMPTY_ARR); cfg.setPeerClassLoadingEnabled(p2pEnabled); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); int[] evts = {EVT_NODE_JOINED, EVT_NODE_FAILED, EVT_NODE_LEFT}; cfg.setIncludeEventTypes(evts); Map<IgnitePredicate<? extends Event>, int[]> lsnrs = new HashMap<>(); lsnrs.put(new TestEventListener(), evts); cfg.setLocalEventListeners(lsnrs); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(); ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); AtomicConfiguration acfg = new AtomicConfiguration(); acfg.setBackups(1); cfg.setAtomicConfiguration(acfg); cfg.setIncludeEventTypes(new int[0]); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration() throws Exception { IgniteConfiguration cfg = super.getConfiguration(); cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST); DataStorageConfiguration sCfg = new DataStorageConfiguration(); sCfg.setPageSize(1024 * 8); cfg.setDataStorageConfiguration(sCfg); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(getIncludeEventTypes()); cfg.setMarshaller(null); cfg.setPeerClassLoadingEnabled(false); if ("client".equals(igniteInstanceName)) { cfg.setClientMode(true); cfg.setClassLoader(ldr); } return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setMarshaller(new BinaryMarshaller()); cfg.setIncludeEventTypes(EventType.EVTS_CACHE); if (getTestIgniteInstanceName(CLIENT_ID).equals(igniteInstanceName)) { cfg.setClientMode(true); CacheConfiguration ccfg = getCacheConfiguration(); cfg.setCacheConfiguration(ccfg); } return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); c.setIncludeEventTypes(); c.setPeerClassLoadingEnabled(false); CacheConfiguration[] ccfg = c.getCacheConfiguration(); if (ccfg != null) { assert ccfg.length == 1 : ccfg.length; c.setCacheConfiguration(ccfg[0], cacheConfiguration()); } else c.setCacheConfiguration(cacheConfiguration()); return c; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); cfg.setDiscoverySpi(discoSpi); cfg.setFileSystemConfiguration(fsConfiguration(igniteInstanceName)); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); cfg.setCommunicationSpi(communicationSpi()); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); cfg.setDiscoverySpi(discoSpi); cfg.setFileSystemConfiguration(igfsConfiguration(igniteInstanceName)); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); cfg.setLocalHost("127.0.0.1"); cfg.setCommunicationSpi(communicationSpi()); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes((int[])null); cfg.setFailureHandler(new TestFailureHandler()); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(CacheMode.PARTITIONED); ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC); ccfg.setWriteSynchronizationMode(FULL_SYNC); ccfg.setBackups(0); cfg.setCacheConfiguration(ccfg); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(); cfg.setConnectorConfiguration(null); CacheConfiguration<Integer, Person> cacheCfg = defaultCacheConfiguration(); cacheCfg.setName(PERSON_CACHE) .setCacheMode(PARTITIONED) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) .setWriteSynchronizationMode(FULL_SYNC) .setBackups(0) .setIndexedTypes(Integer.class, Person.class); cfg.setCacheConfiguration(cacheCfg); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(EventType.EVT_CACHE_REBALANCE_PART_DATA_LOST); cfg.setCacheConfiguration( new CacheConfiguration<>(DEFAULT_CACHE_NAME) .setCacheMode(CacheMode.PARTITIONED) .setBackups(0) .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC) .setAffinity(new RendezvousAffinityFunction(false, 50)) .setPartitionLossPolicy(PartitionLossPolicy.READ_WRITE_SAFE) ); if (isClient) cfg.setClientMode(true); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = new IgniteConfiguration(); TcpDiscoverySpi discoSpi = new TcpDiscoverySpi(); discoSpi.setIpFinder(IP_FINDER); cfg.setIgniteInstanceName(igniteInstanceName); cfg.setMarshaller(new BinaryMarshaller()); cfg.setDiscoverySpi(discoSpi); cfg.setFileSystemConfiguration(igfsConfiguration(igniteInstanceName)); cfg.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); cfg.setFailureHandler(new NoOpFailureHandler()); return cfg; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration() throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.EVICTION); MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); IgniteConfiguration c = super.getConfiguration(); CacheConfiguration cc = defaultCacheConfiguration(); cc.setCacheMode(cacheMode()); cc.setAtomicityMode(atomicityMode()); cc.setEvictionPolicy(new FifoEvictionPolicy()); cc.setOnheapCacheEnabled(true); c.setCacheConfiguration(cc); c.setIncludeEventTypes(EVT_CACHE_ENTRY_EVICTED, EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); return c; }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { MvccFeatureChecker.skipIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); IgniteConfiguration c = super.getConfiguration(igniteInstanceName); CacheConfiguration cc = defaultCacheConfiguration(); cc.setCacheMode(cacheMode); if (nearEnabled) cc.setNearConfiguration(new NearCacheConfiguration()); cc.setAtomicityMode(TRANSACTIONAL); cc.setCacheStoreFactory(new IgniteReflectionFactory<CacheStore>(TestStore.class)); cc.setReadThrough(true); cc.setWriteThrough(true); cc.setLoadPreviousValue(true); c.setCacheConfiguration(cc); c.setIncludeEventTypes(EVT_TASK_FAILED, EVT_TASK_FINISHED, EVT_JOB_MAPPED); return c; }
/** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setIncludeEventTypes(); cfg.setMarshaller(null); RendezvousAffinityFunction aff = new RendezvousAffinityFunction(); aff.setPartitions(3000); CacheConfiguration<Object, Object> parentCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); parentCfg.setAffinity(aff); parentCfg.setAtomicityMode(TRANSACTIONAL); parentCfg.setCacheMode(PARTITIONED); parentCfg.setBackups(2); parentCfg.setWriteSynchronizationMode(FULL_SYNC); cfg.setCacheConfiguration( getTraderCfg(parentCfg), getDepositCfg(parentCfg), getDepositHistoryCfg(parentCfg) ); return cfg; }