[
https://issues.apache.org/jira/browse/SAMZA-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13913631#comment-13913631
]
Garry Turkington commented on SAMZA-110:
----------------------------------------
I fear I made this much harder than it needs be!
Firstly it looks like that an Array[Byte] (or any other value type) does have
an actual object instantiation for each obj in the array, read the part on
"When Allocation is necessary":
http://docs.scala-lang.org/overviews/core/value-classes.html
But since the message payload is already in an Array[Byte] by the time it's
passed into Serde.fromBytes the byte serde isn't making things any worse.
On Jakob's point yeah erasure will mean Array[valuetype] loses its
parameterisation. But do we care, will anything break if we have for example
both:
class ByteSerde extends Serde[Array[Byte]]
class IntArraySerde extends Serde[Array[Int]]
I don't see the runtime erased class types breaking anything?
> Write a ByteSerde
> -----------------
>
> Key: SAMZA-110
> URL: https://issues.apache.org/jira/browse/SAMZA-110
> Project: Samza
> Issue Type: Bug
> Components: container
> Affects Versions: 0.6.0
> Reporter: Chris Riccomini
> Assignee: Garry Turkington
>
> It would be good to have a ByteSerde included in samza-core's serializer
> package. This serde should just be a no-op that returns the arrays it's given.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)