Java Code Examples for org.apache.ignite.configuration.IgniteConfiguration#setPeerClassLoadingEnabled()

The following examples show how to use org.apache.ignite.configuration.IgniteConfiguration#setPeerClassLoadingEnabled() . 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: P2PScanQueryUndeployTest.java    From ignite with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(true);

    cfg.setCacheConfiguration(
        new CacheConfiguration()
            .setName(CACHE_NAME)
            .setBackups(1)
    );

    cfg.setDiscoverySpi(
        new TcpDiscoverySpi()
            .setIpFinder(
                new TcpDiscoveryVmIpFinder(true)
                    .setAddresses(Collections.singletonList("127.0.0.1:47500..47509"))
            )
    );

    cfg.setCommunicationSpi(new MessageCountingCommunicationSpi());

    return cfg;
}
 
Example 2
Source File: MLDeployingTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDiscoverySpi(new TcpDiscoverySpi()
        .setIpFinder(new TcpDiscoveryVmIpFinder()
            .setAddresses(Arrays.asList("127.0.0.1:47500..47509"))));

    cfg.setPeerClassLoadingEnabled(true);

    return cfg;
}
 
Example 3
Source File: GridP2PContinuousDeploymentSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDeploymentMode(CONTINUOUS);

    if (IGNITE_INSTANCE_NAME.equals(igniteInstanceName))
        cfg.setCacheConfiguration();
    else
        cfg.setCacheConfiguration(cacheConfiguration());

    cfg.setPeerClassLoadingEnabled(true);

    return cfg;
}
 
Example 4
Source File: GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);

    c.setPeerClassLoadingEnabled(false);

    return c;
}
 
Example 5
Source File: IgniteCachePartitionedQueryP2PDisabledSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);

    c.setPeerClassLoadingEnabled(false);

    return c;
}
 
Example 6
Source File: IgniteSqlDistributedJoinSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setPeerClassLoadingEnabled(false);

    return cfg;
}
 
Example 7
Source File: GridCacheContinuousQueryConcurrentTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    if (igniteInstanceName.endsWith(String.valueOf(NODES)))
        cfg.setClientMode(ThreadLocalRandom.current().nextBoolean());

    return cfg;
}
 
Example 8
Source File: GridDeploymentSelfTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setDeploymentSpi(depSpi = new TestDeploymentSpi());
    cfg.setPeerClassLoadingEnabled(p2pEnabled);

    // Disable cache since it can deploy some classes during start process.
    cfg.setCacheConfiguration();

    cfg.setIncludeEventTypes(EventType.EVTS_ALL);

    return cfg;
}
 
Example 9
Source File: IgniteCacheStoreValueAbstractTest.java    From ignite with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    return cfg;
}
 
Example 10
Source File: GridP2PDisabledSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    cfg.setDeploymentMode(depMode);

    if (initGar) {
        UriDeploymentSpi depSpi = new UriDeploymentSpi();

        depSpi.setUriList(Collections.singletonList(garFile));

        cfg.setDeploymentSpi(depSpi);
    }

    cfg.setMetricsUpdateFrequency(500);

    return cfg;
}
 
Example 11
Source File: IgniteNoClassOnServerAbstractTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/**
 * @return Configuration.
 */
private IgniteConfiguration createConfiguration() {
    IgniteConfiguration cfg = new IgniteConfiguration();

    cfg.setPeerClassLoadingEnabled(false);

    cfg.setLocalHost("127.0.0.1");

    TcpDiscoverySpi disco = new TcpDiscoverySpi();

    disco.setIpFinderCleanFrequency(1000);

    TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();

    ipFinder.setAddresses(Arrays.asList("127.0.0.1:47500..47509"));

    disco.setIpFinder(ipFinder);

    cfg.setDiscoverySpi(disco);

    return cfg;
}
 
Example 12
Source File: IgniteMarshallerCacheConcurrentReadWriteTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);

    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);

    ccfg.setCacheMode(REPLICATED);
    ccfg.setRebalanceMode(SYNC);
    ccfg.setWriteSynchronizationMode(FULL_SYNC);

    cfg.setCacheConfiguration(ccfg);

    return cfg;
}
 
Example 13
Source File: BinaryMetadataUpdatesFlowTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(gridName);

    cfg.setPeerClassLoadingEnabled(false);

    if (discoveryHook != null) {
        ((TestTcpDiscoverySpi)cfg.getDiscoverySpi()).discoveryHook(discoveryHook);

        cfg.setMetricsUpdateFrequency(1000);
    }

    cfg.setMarshaller(new BinaryMarshaller());

    cfg.setClientMode("client".equals(gridName) || getTestIgniteInstanceIndex(gridName) >= GRID_CNT);

    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);

    ccfg.setCacheMode(CacheMode.REPLICATED);

    cfg.setCacheConfiguration(ccfg);

    return cfg;
}
 
Example 14
Source File: GridCacheOffheapUpdateSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME);

    ccfg.setCacheMode(CacheMode.PARTITIONED);
    ccfg.setNearConfiguration(null);
    ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);

    cfg.setCacheConfiguration(ccfg);

    return cfg;
}
 
Example 15
Source File: GridCacheAbstractDistributedByteArrayValuesSelfTest.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);

    CacheConfiguration mvccCfg = cacheConfiguration(MVCC_CACHE)
        .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT)
        .setNearConfiguration(null); // TODO IGNITE-7187: remove near cache disabling.

    CacheConfiguration ccfg = cacheConfiguration(CACHE);

    c.setCacheConfiguration(ccfg, mvccCfg);

    c.setPeerClassLoadingEnabled(peerClassLoading());

    return c;
}
 
Example 16
Source File: IgniteBinaryObjectFieldsQuerySelfTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    cfg.setMarshaller(null);

    if (getTestIgniteInstanceName(3).equals(igniteInstanceName))
        cfg.setClassLoader(extClassLoader);

    return cfg;
}
 
Example 17
Source File: IgniteCachePutGetRestartAbstractTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    if (igniteInstanceName.equals(getTestIgniteInstanceName(gridCount() - 1)))
        cfg.setClientMode(true);

    cfg.setPeerClassLoadingEnabled(false);

    ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);

    return cfg;
}
 
Example 18
Source File: IgniteSqlQueryParallelismTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    CacheConfiguration ccfg1 = cacheConfig("pers", Integer.class, Person2.class).setQueryParallelism(qryParallelism);
    CacheConfiguration ccfg2 = cacheConfig("org", Integer.class, Organization.class).setQueryParallelism(qryParallelism);

    cfg.setCacheConfiguration(ccfg1, ccfg2);

    return cfg;
}
 
Example 19
Source File: GridCacheOnCopyFlagAbstractSelfTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);

    c.setPeerClassLoadingEnabled(p2pEnabled);

    c.getTransactionConfiguration().setTxSerializableEnabled(true);

    return c;
}
 
Example 20
Source File: CacheSerializableTransactionsTest.java    From ignite with Apache License 2.0 3 votes vote down vote up
/** {@inheritDoc} */
@Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

    cfg.setPeerClassLoadingEnabled(false);

    ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1);

    return cfg;
}