Search in sources :

Example 71 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class TcpClientDiscoveryMarshallerCheckSelfTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    if (testFooter) {
        cfg.setMarshaller(new BinaryMarshaller());
        TcpDiscoverySpi spi = new TcpDiscoverySpi();
        // IGNITE-605, and further tests limitation bypass
        spi.setJoinTimeout(-1);
        cfg.setDiscoverySpi(spi);
        if (igniteInstanceName.endsWith("0")) {
            BinaryConfiguration bc = new BinaryConfiguration();
            bc.setCompactFooter(false);
            cfg.setBinaryConfiguration(bc);
            cfg.setClientMode(true);
        }
    } else {
        if (igniteInstanceName.endsWith("0"))
            cfg.setMarshaller(new JdkMarshaller());
        else {
            cfg.setClientMode(true);
            cfg.setMarshaller(new BinaryMarshaller());
        }
        TcpDiscoverySpi spi = new TcpDiscoverySpi().setIpFinder(ipFinder);
        cfg.setDiscoverySpi(spi);
    }
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryConfiguration(org.apache.ignite.configuration.BinaryConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller)

Example 72 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class ClosureServiceClientsNodesTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    cfg.setMarshaller(new BinaryMarshaller());
    cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(ipFinder).setForceServerMode(true));
    cfg.setCacheConfiguration();
    if (igniteInstanceName.equals(getTestIgniteInstanceName(0)))
        cfg.setClientMode(true);
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 73 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class DynamicIndexAbstractSelfTest method commonConfiguration.

/**
 * Create common node configuration.
 *
 * @param idx Index.
 * @return Configuration.
 * @throws Exception If failed.
 */
protected IgniteConfiguration commonConfiguration(int idx) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(getTestIgniteInstanceName(idx));
    cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(IP_FINDER));
    cfg.setMarshaller(new BinaryMarshaller());
    DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration(new DataRegionConfiguration().setMaxSize(128 * 1024 * 1024));
    cfg.setDataStorageConfiguration(memCfg);
    return optimize(cfg);
}
Also used : DataStorageConfiguration(org.apache.ignite.configuration.DataStorageConfiguration) DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 74 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class H2DynamicIndexAbstractSelfTest method commonConfiguration.

/**
 * Create common node configuration.
 *
 * @param idx Index.
 * @return Configuration.
 * @throws Exception If failed.
 */
private IgniteConfiguration commonConfiguration(int idx) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(getTestIgniteInstanceName(idx));
    cfg.setMarshaller(new BinaryMarshaller());
    return optimize(cfg);
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller)

Example 75 with BinaryMarshaller

use of org.apache.ignite.internal.binary.BinaryMarshaller in project ignite by apache.

the class IgniteSqlKeyValueFieldsTest method getConfiguration.

/**
 * {@inheritDoc}
 */
@Override
protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(gridName);
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    c.setDiscoverySpi(disco);
    c.setMarshaller(new BinaryMarshaller());
    List<CacheConfiguration> ccfgs = new ArrayList<>();
    CacheConfiguration ccfg = buildCacheConfiguration(gridName);
    if (ccfg != null)
        ccfgs.add(ccfg);
    ccfgs.add(buildCacheConfiguration(CACHE_PERSON_NO_KV));
    ccfgs.add(buildCacheConfiguration(CACHE_INT_NO_KV_TYPE));
    ccfgs.add(buildCacheConfiguration(CACHE_PERSON));
    ccfgs.add(buildCacheConfiguration(CACHE_JOB));
    c.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()]));
    if (gridName.equals(NODE_CLIENT))
        c.setClientMode(true);
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) ArrayList(java.util.ArrayList) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)93 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)61 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)34 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)22 BinaryConfiguration (org.apache.ignite.configuration.BinaryConfiguration)14 Ignite (org.apache.ignite.Ignite)9 BinaryTypeConfiguration (org.apache.ignite.binary.BinaryTypeConfiguration)9 GridBinaryMarshaller (org.apache.ignite.internal.binary.GridBinaryMarshaller)9 BinaryContext (org.apache.ignite.internal.binary.BinaryContext)8 ArrayList (java.util.ArrayList)7 BinaryObject (org.apache.ignite.binary.BinaryObject)7 Marshaller (org.apache.ignite.marshaller.Marshaller)7 IgniteException (org.apache.ignite.IgniteException)6 NullLogger (org.apache.ignite.logger.NullLogger)6 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)6 HashMap (java.util.HashMap)5 CacheKeyConfiguration (org.apache.ignite.cache.CacheKeyConfiguration)5 MarshallerContextTestImpl (org.apache.ignite.marshaller.MarshallerContextTestImpl)5 NearCacheConfiguration (org.apache.ignite.configuration.NearCacheConfiguration)4 JdkMarshaller (org.apache.ignite.marshaller.jdk.JdkMarshaller)4