ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Fedotov <alexander.fedot...@gmail.com>
Subject Re: deploy is not working by IgniteDataStreamer
Date Tue, 27 Jun 2017 14:30:03 GMT
Hi,

Stream receiver is executed on server nodes, which don't have real
ru.test.domain.Call definition only it's binary representation
sent during peer class loading.
You need to set streamer.keepBinary(true) and operate on a BinaryObject
inside the stream receiver instead of operating on ru.test.domain.Call.

Kind regards,
Alex.

On Mon, Jun 19, 2017 at 5:35 PM, afedotov <alexander.fedotoff@gmail.com>
wrote:

> Hi.
>
> Could you please share Ignite configuration and the exact code you use to
> stream data.
> Also, please share the full logs.
>
> Kind regards,
> Alex.
>
> On Thu, Jun 15, 2017 at 10:40 AM, nash1k [via Apache Ignite Users] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=13963&i=0>> wrote:
>
>> Hi!
>> I tried to use IgniteDataStreamer with kafka integration (extends
>> StreamAdapter), but had a little strange situation.
>> final IgniteDataStreamer<String, Call> streamer =
>> ignite.dataStreamer(callCache().getName());
>> streamer.autoFlushFrequency(5000);
>> streamer.keepBinary(false);
>> streamer.perNodeBufferSize(5120);
>>
>> On the remote node when I tried to get value from the Collection of
>> entries:
>> public void receive(final IgniteCache<String, Call> cache, final
>> Collection<Map.Entry<String, Call>> callEntries) throws IgniteException
{
>> callEntries.forEach(binaryCall -> {
>>             Call call = binaryCall.getValue();
>> }
>>
>> I have Exception:
>> [16:47:49] (err) Failed to execute compound future reducer:
>> GridCompoundFuture [rdc=null, initFlag=1, lsnrCalls=0, done=false,
>> cancelled=false, err=null, futs=[true]]class org.apache.ignite.IgniteCheckedException:
>> DataStreamer request failed [node=61c1854a-338f-435b-ae61-fa1ec3f8a1a7]
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> merImpl$Buffer.onResponse(DataStreamerImpl.java:1772)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> merImpl$3.onMessage(DataStreamerImpl.java:333)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.invokeListener(GridIoManager.java:1257)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.processRegularMessage0(GridIoManager.java:885)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.access$2100(GridIoManager.java:114)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger$7.run(GridIoManager.java:802)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>
>>         at java.lang.Thread.run(Thread.java:748)
>> Caused by: class org.apache.ignite.binary.BinaryInvalidTypeException:
>> ru.test.domain.Call
>>         at org.apache.ignite.internal.binary.BinaryContext.descriptorFo
>> rTypeId(BinaryContext.java:701)
>>         at org.apache.ignite.internal.binary.BinaryReaderExImpl.deseria
>> lize0(BinaryReaderExImpl.java:1745)
>>         at org.apache.ignite.internal.binary.BinaryReaderExImpl.deseria
>> lize(BinaryReaderExImpl.java:1704)
>>         at org.apache.ignite.internal.binary.BinaryObjectImpl.deseriali
>> zeValue(BinaryObjectImpl.java:794)
>>         at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:142)
>>
>>         at org.apache.ignite.internal.processors.cache.CacheObjectConte
>> xt.unwrapBinary(CacheObjectContext.java:273)
>>         at org.apache.ignite.internal.processors.cache.CacheObjectConte
>> xt.unwrapBinaryIfNeeded(CacheObjectContext.java:161)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> merEntry$1.getValue(DataStreamerEntry.java:96)
>>         at ru.test.service.CallbackReceiver.lambda$receive$1(CallbackReceiver.java:90)
>>
>>         at java.lang.Iterable.forEach(Iterable.java:75)
>>         at ru.test.service.CallbackReceiver.receive(CallbackReceiver.java:81)
>>
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> merUpdateJob.call(DataStreamerUpdateJob.java:137)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> mProcessor.localUpdate(DataStreamProcessor.java:382)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> mProcessor.processRequest(DataStreamProcessor.java:301)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> mProcessor.access$000(DataStreamProcessor.java:58)
>>         at org.apache.ignite.internal.processors.datastreamer.DataStrea
>> mProcessor$1.onMessage(DataStreamProcessor.java:88)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.invokeListener(GridIoManager.java:1257)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.processRegularMessage0(GridIoManager.java:885)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger.access$2100(GridIoManager.java:114)
>>         at org.apache.ignite.internal.managers.communication.GridIoMana
>> ger$7.run(GridIoManager.java:802)
>>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>
>>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>
>>         at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.lang.ClassNotFoundException: ru.test.domain.Call
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>>         at java.lang.Class.forName0(Native Method)
>>         at java.lang.Class.forName(Class.java:348)
>>         at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:8478)
>>
>>         at org.apache.ignite.internal.MarshallerContextImpl.getClass(MarshallerContextImpl.java:340)
>>
>>         at org.apache.ignite.internal.binary.BinaryContext.descriptorFo
>> rTypeId(BinaryContext.java:692)
>>         ... 22 more
>>
>>
>> The same error when I use:
>> streamer.deployClass(Call.getClass);
>>
>> If I use BinaryObject and keepBinary instead of Call and create objects
>> from binary format - it's working fine.
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://apache-ignite-users.70518.x6.nabble.com/deploy-is-not
>> -working-by-IgniteDataStreamer-tp13804.html
>> To start a new topic under Apache Ignite Users, email [hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=13963&i=1>
>> To unsubscribe from Apache Ignite Users, click here.
>> NAML
>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: deploy is not working by
> IgniteDataStreamer
> <http://apache-ignite-users.70518.x6.nabble.com/deploy-is-not-working-by-IgniteDataStreamer-tp13804p13963.html>
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>

Mime
View raw message