[ 
https://issues.apache.org/jira/browse/SPARK-10510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14738404#comment-14738404
 ] 

Johannes Günther commented on SPARK-10510:
------------------------------------------

If I understand It correctly from reading the Kryo Documentation you just 
implement your Serializer class.
But from the first look there is not method to register this custom serializer.
But you if you have one or two classes to serialize with a specific schema 
extend your object with 
{code:SomeClass.java|borderStyle=solid}
  public class SomeClass implements KryoSerializable {
       // ...

       public void write (Kryo kryo, Output output) {
          // ...
       }

       public void read (Kryo kryo, Input input) {
          // ...
       }
    }
{code}

You can register that class now with SparkConf.registerKryoClasses.

> Add documentation for how to register a custom Kryo serializer in Spark
> -----------------------------------------------------------------------
>
>                 Key: SPARK-10510
>                 URL: https://issues.apache.org/jira/browse/SPARK-10510
>             Project: Spark
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.4.1
>            Reporter: Thomas Dudziak
>            Priority: Minor
>
> The documentation states how to register classes and links to Kryo 
> documentation for writing custom serializers, but doesn't say how to register 
> those with Spark.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to