[infinispan-dev] MapReduceTask serialization

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] MapReduceTask serialization

Vladimir Blagojevic
Hey,

I've sort of hit a snag with the current MapReduce design and
serialization. Our MapReduceTask API allows users to specify Mapper,
Reducer and Collator interfaces as anonymous classes [1]. However, we
can not serialize instances of these classes as they are anonymous
[2](see Note in section 1.10).

Of course, users can specify static implementations of these interfaces
and we can put a big warning notice about anonymous class
implementations of Mapper, Reducer and Collator but our MapReduceTask
fluent API itself nudges users to use anonymous classes :-(

Not sure what to do! Ideas?


[1]http://community.jboss.org/wiki/InfinispanDistributedExecutionFramework#Examples 

[2]http://download.oracle.com/javase/6/docs/platform/serialization/spec/serial-arch.html
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] MapReduceTask serialization

Manik Surtani
Yeah that sucks.  I suppose we just need to specify that anonymous classes are not used.  :/

On 9 Mar 2011, at 16:01, Vladimir Blagojevic wrote:

> Hey,
>
> I've sort of hit a snag with the current MapReduce design and
> serialization. Our MapReduceTask API allows users to specify Mapper,
> Reducer and Collator interfaces as anonymous classes [1]. However, we
> can not serialize instances of these classes as they are anonymous
> [2](see Note in section 1.10).
>
> Of course, users can specify static implementations of these interfaces
> and we can put a big warning notice about anonymous class
> implementations of Mapper, Reducer and Collator but our MapReduceTask
> fluent API itself nudges users to use anonymous classes :-(
>
> Not sure what to do! Ideas?
>
>
> [1]http://community.jboss.org/wiki/InfinispanDistributedExecutionFramework#Examples 
>
> [2]http://download.oracle.com/javase/6/docs/platform/serialization/spec/serial-arch.html
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] MapReduceTask serialization

Galder Zamarreno
Even if the Serializable/Externalizer rules do not allow this, I wonder whether if anonymous classes that have externalizers associated to the would work...

Vladimir, I'm gonna this out and let you know if it works - good addition to testsuite as well

On Mar 9, 2011, at 5:11 PM, Manik Surtani wrote:

> Yeah that sucks.  I suppose we just need to specify that anonymous classes are not used.  :/
>
> On 9 Mar 2011, at 16:01, Vladimir Blagojevic wrote:
>
>> Hey,
>>
>> I've sort of hit a snag with the current MapReduce design and
>> serialization. Our MapReduceTask API allows users to specify Mapper,
>> Reducer and Collator interfaces as anonymous classes [1]. However, we
>> can not serialize instances of these classes as they are anonymous
>> [2](see Note in section 1.10).
>>
>> Of course, users can specify static implementations of these interfaces
>> and we can put a big warning notice about anonymous class
>> implementations of Mapper, Reducer and Collator but our MapReduceTask
>> fluent API itself nudges users to use anonymous classes :-(
>>
>> Not sure what to do! Ideas?
>>
>>
>> [1]http://community.jboss.org/wiki/InfinispanDistributedExecutionFramework#Examples 
>>
>> [2]http://download.oracle.com/javase/6/docs/platform/serialization/spec/serial-arch.html
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Manik Surtani
> [hidden email]
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Galder ZamarreƱo
Sr. Software Engineer
Infinispan, JBoss Cache


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] MapReduceTask serialization

Vladimir Blagojevic
Yeah, not sure how to do it. David hinted to see if we can use
writeReplace to remove a reference to enclosing class from anonymous
class i.e. basically ignore enclosing class.
On 11-03-09 11:26 AM, Galder ZamarreƱo wrote:
> Even if the Serializable/Externalizer rules do not allow this, I wonder whether if anonymous classes that have externalizers associated to the would work...
>
> Vladimir, I'm gonna this out and let you know if it works - good addition to testsuite as well
>
> On Mar 9, 2011, at 5:11 PM, Manik Surtani wrote:
>
>> Yeah that sucks.  I suppose we just need to specify that anonymous classes are not used.  :/
>>
>> On 9 Mar 2011, at 16:01, Vladimir Blagojevic wrote:

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev