You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by VeenaMithare <v....@cmcmarkets.com> on 2021/03/24 07:23:15 UTC

Re: Right Handling of UnRegisteredBinaryObjectTypeException

Hi Anton,

Please find a sample project with one of the
'unregisteredbinarytypeexception' .  The readme.txt is present in the
attached zip.

TestProject.zip
<http://apache-ignite-users.70518.x6.nabble.com/file/t2757/TestProject.zip>  
As mentioned in the readme.txt , the behaviour noticed is as below :

1. Run the UpdateClientNotWorking - insert of a record through entry
processor doesnt work.
2. Run the UpdateClientWorking - insert of a record through entry processor
works. This is because we do a dummy registration of metadata on the client
side before the entryprocessor is invoked within the transaction.

Questions are as below :
1. Why does the entry processor run in the client side ? As per the
definition of entry processor - it is used to execute updates on entries on
the nodes that store it . TestProject.zip
https://ignite.apache.org/docs/latest/distributed-computing/collocated-computations#entry-processor

2. Because of point 1, when we execute a transaction of say 1000 records, we
need to give a huge timeout value - since most of the time of the
transaction is spent in the client execution of the entry processor . Is
there any workaround for this ?

regards,
Veena.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Right Handling of UnRegisteredBinaryObjectTypeException

Posted by andrei <ae...@gmail.com>.
Hi,

Answer was provided here - 
http://apache-ignite-users.70518.x6.nabble.com/2-8-1-CacheEntryProcessor-for-insert-update-within-Transaction-supported-tt35918.html

BR,
Andrei

4/20/2021 3:50 PM, VeenaMithare пишет:
> Hello all,
>
> Please guide me on the right way to use cacheentryprocessor within a
> transaction to update cache records .
>
> As shown in the example above, insert of a new record always throws
> UnregisteredBinaryTypeException - unless a metadata is registered on the
> client side before starting the transaction.
>
> regards,
> Veena.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Right Handling of UnRegisteredBinaryObjectTypeException

Posted by VeenaMithare <v....@cmcmarkets.com>.
Hello all, 

Please guide me on the right way to use cacheentryprocessor within a
transaction to update cache records . 

As shown in the example above, insert of a new record always throws
UnregisteredBinaryTypeException - unless a metadata is registered on the
client side before starting the transaction.

regards,
Veena.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Right Handling of UnRegisteredBinaryObjectTypeException

Posted by VeenaMithare <v....@cmcmarkets.com>.
Hello, 

Did anyone get a chance to look at this ?

Also I noticed that I can skip the execution of the entry processor if it is
executing on the client side ( could pass a variable that identifies where
it runs ) . 

i.e. at the start of the entry processor put something like 

public Object process(MutableEntry<BinaryObject, BinaryObject>
entry,
Object... arguments) throws EntryProcessorException {
if ( execution  is on a client node )
{
return; 
}
....

return ;
}

This avoids the time taken for the entry processor to execute on the client
side. 
It ensures that the entry processor runs only the serverside and updates the
desired records. 

Kindly guide if this approach is acceptable or will it have any other side
effects. 

regards,
Veena



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Right Handling of UnRegisteredBinaryObjectTypeException

Posted by VeenaMithare <v....@cmcmarkets.com>.
Hi Anton, 

Did you get a chance to look at this ?

regards,
Veena.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/