-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30825/
-----------------------------------------------------------

(Updated Feb. 12, 2015, 10:18 p.m.)


Review request for samza.


Repository: samza


Description
-------

I added 2 implementations as I'm not sure how Serde will be used.
Intention is to add only one but I need feedback to make correct trade-off.

Generic serializer SerializableSerde creates quite clumsy API because it takes 
and returns Serializable. So real objects need to be casted as shown in 
TestSerializableSerde.

```scala
serde.toBytes(obj.asInstanceOf[java.io.Serializable])
val objRoundTrip:String = serde.fromBytes(bytes).asInstanceOf[String]
```

Type-specific one SerializableTypeSerde gives more clean API but most other 
Serdes instantiated from config string. Not sure type can be passed in runtime.


Diffs (updated)
-----

  
samza-core/src/main/scala/org/apache/samza/serializers/SerializableSerde.scala 
PRE-CREATION 
  
samza-core/src/test/scala/org/apache/samza/serializers/TestSerializableSerde.scala
 PRE-CREATION 

Diff: https://reviews.apache.org/r/30825/diff/


Testing
-------


Thanks,

Ruslan Khafizov

Reply via email to