You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2018/08/05 12:38:01 UTC

[GitHub] borissmidt opened a new issue #2973: Serializer documentation

borissmidt opened a new issue #2973: Serializer documentation
URL: https://github.com/apache/incubator-heron/issues/2973
 
 
   Dear, 
   
   I'm trying to use the chill kryo serializer since i'm trying to build a project on top of heron using scala so i can serialize case classes, without no arg constructors.
   
   But the documentation about registering custom serializes isn't very clear. 
   You need to put the serializer class on the classpath of heron but this isn't mentioned how its done.
   You need to edit a topology config which is the config you pass with the submit.
   
   And then you have to recompile the entire heron project which seems a bit inconvenient.
   
   https://apache.github.io/incubator-heron/docs/developers/serialization/
   
   The serializer i have created:
   `
   class KyroScala extends IPluggableSerializer{
     def kryo: KryoPool = ScalaKryoInstantiator.defaultPool
   
     override def initialize(config: util.Map[String, AnyRef]): Unit = {
   
     }
   
     override def serialize(`object`: scala.Any): Array[Byte] = kryo.toBytesWithClass()
   
     override def deserialize(input: Array[Byte]): AnyRef = kryo.fromBytes(input)
   }
   `

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services