[
https://issues.apache.org/jira/browse/STORM-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14007280#comment-14007280
]
ASF GitHub Bot commented on STORM-332:
--------------------------------------
GitHub user dschiavu opened a pull request:
https://github.com/apache/incubator-storm/pull/125
Enable Kryo serialization in storm-kafka (STORM-332)
Add a no args constructor to storm-kafka's Broker and Partition classes to
enable Kryo serialization when using the storm-kafka spout (STORM-332)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dschiavu/incubator-storm
STORM-332-kafka-spout-kryo-compatibility
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-storm/pull/125.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #125
----
commit 52d2f2f9160f90a97de2d49a3827bd8c103fb14e
Author: Danijel Schiavuzzi <[email protected]>
Date: 2014-05-23T15:52:56Z
Add a no args constructor to storm-kafka's Broker and Partition classes
to enable Kryo serialization when using the storm-kafka spout
(STORM-332)
----
> Add support for Kryo serialization in the Kafka spout classes
> -------------------------------------------------------------
>
> Key: STORM-332
> URL: https://issues.apache.org/jira/browse/STORM-332
> Project: Apache Storm (Incubating)
> Issue Type: Improvement
> Reporter: Danijel Schiavuzzi
>
> The classes {{storm.kafka.Broker}} and {{storm.kafka.Partition}} from the new
> kafka-spout module can't be serialized by Kryo (using the default
> FieldsSerializer):
> {noformat}
> java.lang.RuntimeException: com.esotericsoftware.kryo.KryoException: Class
> cannot be created (missing no-arg constructor): storm.kafka.Broker
> Serialization trace:
> partitionMap (storm.kafka.trident.GlobalPartitionInformation)
> {noformat}
> A workaround to enabling Kryo compatibility is to add a private, no argument
> constructor to both classes (as done in
> backtype.storm.transactional.TransactionAttempt or
> backtype.storm.tuple.Values, for example).
> This enables us to use the Kafka spout with Kryo, instead of Storm
> fallbacking to Java serialization.
--
This message was sent by Atlassian JIRA
(v6.2#6252)