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

ASF GitHub Bot commented on GIRAPH-1188:
----------------------------------------

Github user yukselakinci commented on a diff in the pull request:

    https://github.com/apache/giraph/pull/70#discussion_r184590041
  
    --- Diff: 
giraph-core/src/main/java/org/apache/giraph/writable/kryo/GiraphClassResolver.java
 ---
    @@ -0,0 +1,333 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.giraph.writable.kryo;
    +import com.esotericsoftware.kryo.Kryo;
    +import com.esotericsoftware.kryo.KryoException;
    +import com.esotericsoftware.kryo.Registration;
    +import com.esotericsoftware.kryo.io.Input;
    +import com.esotericsoftware.kryo.io.Output;
    +import com.esotericsoftware.kryo.util.DefaultClassResolver;
    +import com.esotericsoftware.kryo.util.ObjectMap;
    +import org.apache.giraph.zk.ZooKeeperExt;
    +import org.apache.zookeeper.CreateMode;
    +import org.apache.zookeeper.KeeperException;
    +import org.apache.zookeeper.ZooDefs;
    +import java.util.HashMap;
    +import java.util.Map;
    +import java.util.List;
    +
    +import static com.esotericsoftware.kryo.util.Util.getWrapperClass;
    +
    +/**
    + * This class resolver assigns unique classIds for every class that was not
    + * explicitly registered. It uses zookeeper for consistent mapping across 
all
    + * nodes.
    + */
    --- End diff --
    
    Added more documentation.


> Add kryo custom class resolver for faster serialization.
> --------------------------------------------------------
>
>                 Key: GIRAPH-1188
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-1188
>             Project: Giraph
>          Issue Type: Improvement
>            Reporter: Yuksel Akinci
>            Priority: Major
>
> The custom class resolver allows kryo to always use the integer IDs for 
> classes that are agreed by all nodes running the job. Default class resolver 
> always writes the full class name of  the first encountered class type to the 
> stream, and then it assigns an integer for subsequent instances. These 
> changes make the serialization faster by eliminating the need to write the 
> full name for the first encountered class instance. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to