custom serialization

1 view
Skip to first unread message

Curt Holden

unread,
Feb 5, 2015, 1:58:14 PM2/5/15
to pangoo...@googlegroups.com
Hello,

I am following the Setting custom serialization recipe at http://pangool.net/userguide/schemas.html, but it appears that the com.datasalt.pangool.io.Field.setSerialization() method no longer exists in Pangool 0.70.  Is field serialization no longer supported in schema?

At a higher level, my mapper is reading Avro and I would like to simply pass that data in Avro format onto the reducer.  What is the best way to do that?

Thanks,

Curt-

Iván de Prado

unread,
Feb 6, 2015, 4:44:18 AM2/6/15
to pangoo...@googlegroups.com
Hi Curt, 


This is an example of using Avro in a Pangool tuple field:

  List<Field> fields = new ArrayList<Field>(); 
  fields.add(Fields.createAvroField("my_avro_field", myAvroSchema));
  Schema schema = new Schema("schema", fields);
  
  Tuple tuple = new Tuple(schema);
  Record avroRecord = new Record(myAvroSchema); //Avro Record
  tuple.set("my_avro_field", avroRecord);


In the example you will see a how to pass the avro data just to the reducer. 

Regards, 
Iván

--
Has recibido este mensaje porque estás suscrito al grupo "pangool-user" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a pangool-user...@googlegroups.com.
Para acceder a más opciones, visita https://groups.google.com/d/optout.



--
Iván de Prado
CEO & Co-founder

Curt Holden

unread,
Feb 6, 2015, 5:00:17 PM2/6/15
to pangoo...@googlegroups.com
The first example you listed helped me sort out my issue.

Thanks,

Curt-
Reply all
Reply to author
Forward
0 new messages