crunch-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucy Chen <>
Subject serialize and materialize
Date Wed, 29 Apr 2015 22:39:53 GMT

     I have my own class defined as follows:

public class A implements, Cloneable{

 private String id;

private String name;

private Map<String, Float> codes;

public A()


this(null, null, new HashMap<String, Float>());




and will generate a PCollection<PTypeA> DataA, PType<A> PTypeA =

Then when it is materialized by Iterable<PTypeA> DataA_mat.materialize(),
it will throw a not serializable exception or not materializable exception.
I think if I include Set<> as a member of class A instead of Map, it will
fail too;

Can any one knows how we can define the class appropriately if we want to
materialize DataA here? Or is there another serialization way instead of
Avros.records so that materialize() will work as well? I can only make it
work for a class excluding a Set or Map type member. That makes a lot of
trouble for me.



View raw message