Search in sources :

Example 11 with JdkMarshaller

use of org.apache.ignite.marshaller.jdk.JdkMarshaller in project ignite by apache.

the class CacheEntryProcessorNonSerializableTest method getConfiguration.

/** {@inheritDoc} */
@Override
protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
    IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
    ((TcpDiscoverySpi) cfg.getDiscoverySpi()).setIpFinder(ipFinder);
    ((TcpCommunicationSpi) cfg.getCommunicationSpi()).setSharedMemoryPort(-1);
    cfg.setClientMode(client);
    //set custom marshaller to get expected exception
    cfg.setMarshaller(new JdkMarshaller());
    return cfg;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Example 12 with JdkMarshaller

use of org.apache.ignite.marshaller.jdk.JdkMarshaller in project ignite by apache.

the class IgniteExternalizableAbstractTest method getMarshallers.

/**
     * @return Marshallers.
     */
protected List<Marshaller> getMarshallers() throws IgniteCheckedException {
    List<Marshaller> marshallers = new ArrayList<>();
    BinaryMarshaller bin = createStandaloneBinaryMarshaller();
    marshallers.add(new JdkMarshaller());
    marshallers.add(bin);
    return marshallers;
}
Also used : BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller) Marshaller(org.apache.ignite.marshaller.Marshaller) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) ArrayList(java.util.ArrayList) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller)

Example 13 with JdkMarshaller

use of org.apache.ignite.marshaller.jdk.JdkMarshaller in project ignite by apache.

the class GridIoManagerSelfTest method beforeTest.

/** {@inheritDoc} */
@Override
protected void beforeTest() throws Exception {
    ctx.config().setCommunicationSpi(new TcpCommunicationSpi());
    ctx.config().setMarshaller(new JdkMarshaller());
    // Turn off peer class loading to simplify mocking.
    ctx.config().setPeerClassLoadingEnabled(false);
    // Register local and remote nodes in discovery manager.
    GridDiscoveryManager mockedDiscoveryMgr = Mockito.mock(GridDiscoveryManager.class);
    when(mockedDiscoveryMgr.localNode()).thenReturn(locNode);
    when(mockedDiscoveryMgr.remoteNodes()).thenReturn(F.<ClusterNode>asList(rmtNode));
    ctx.add(mockedDiscoveryMgr);
}
Also used : GridDiscoveryManager(org.apache.ignite.internal.managers.discovery.GridDiscoveryManager) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller) TcpCommunicationSpi(org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)

Example 14 with JdkMarshaller

use of org.apache.ignite.marshaller.jdk.JdkMarshaller in project ignite by apache.

the class GridCacheStoreManagerDeserializationTest method getConfiguration.

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception {
    IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
    if (igniteInstanceName != null && igniteInstanceName.toLowerCase().startsWith("binary"))
        c.setMarshaller(new BinaryMarshaller());
    else
        c.setMarshaller(new JdkMarshaller());
    TcpDiscoverySpi disco = new TcpDiscoverySpi();
    disco.setIpFinder(IP_FINDER);
    c.setDiscoverySpi(disco);
    c.setCacheConfiguration(cacheConfiguration());
    return c;
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BinaryMarshaller(org.apache.ignite.internal.binary.BinaryMarshaller) JdkMarshaller(org.apache.ignite.marshaller.jdk.JdkMarshaller) TcpDiscoverySpi(org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)

Aggregations

JdkMarshaller (org.apache.ignite.marshaller.jdk.JdkMarshaller)14 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)7 BinaryMarshaller (org.apache.ignite.internal.binary.BinaryMarshaller)4 TcpDiscoverySpi (org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi)3 IgniteLogger (org.apache.ignite.IgniteLogger)2 HadoopExternalCommunication (org.apache.ignite.internal.processors.hadoop.taskexecutor.external.communication.HadoopExternalCommunication)2 Marshaller (org.apache.ignite.marshaller.Marshaller)2 TcpCommunicationSpi (org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi)2 File (java.io.File)1 PrintStream (java.io.PrintStream)1 Connection (java.sql.Connection)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 UUID (java.util.UUID)1 ExecutorService (java.util.concurrent.ExecutorService)1 AtomicLong (java.util.concurrent.atomic.AtomicLong)1 CacheException (javax.cache.CacheException)1 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)1 IgniteException (org.apache.ignite.IgniteException)1 IgniteSystemProperties.getString (org.apache.ignite.IgniteSystemProperties.getString)1