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

ASF GitHub Bot commented on FLINK-6566:
---------------------------------------

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

    https://github.com/apache/flink/pull/3883#discussion_r116249086
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/core/io/VersionedIOReadableWritable.java
 ---
    @@ -18,55 +18,66 @@
     
     package org.apache.flink.core.io;
     
    -import org.apache.flink.annotation.PublicEvolving;
    +import org.apache.flink.annotation.Internal;
     import org.apache.flink.core.memory.DataInputView;
     import org.apache.flink.core.memory.DataOutputView;
     
     import java.io.IOException;
    +import java.util.Arrays;
     
     /**
      * This is the abstract base class for {@link IOReadableWritable} which 
allows to differentiate between serialization
      * versions. Concrete subclasses should typically override the {@link 
#write(DataOutputView)} and
      * {@link #read(DataInputView)}, thereby calling super to ensure version 
checking.
      */
    -@PublicEvolving
    +@Internal
     public abstract class VersionedIOReadableWritable implements 
IOReadableWritable, Versioned {
     
    +   private Integer readVersion;
    --- End diff --
    
    I think I would not use `Integer` here but `int` instead and have some 
undefined value, e.g. `Integer.MIN_VALUE`


> Narrow down interface for compatibility hook method in 
> VersionedIOReadableWritable
> ----------------------------------------------------------------------------------
>
>                 Key: FLINK-6566
>                 URL: https://issues.apache.org/jira/browse/FLINK-6566
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core, Type Serialization System
>    Affects Versions: 1.3.0
>            Reporter: Tzu-Li (Gordon) Tai
>
> The {{VersionedIOReadableWritable}} provides a {{isCompatibleVersion}} method 
> that allows users to override to resolve older versions.
> This method allows too much space for the user to mess up the implementation, 
> and is much more relevant now because we have an user-facing class 
> {{TypeSerializerConfigSnapshot}} which extends 
> {{VersionedIOReadableWritable}}.
> Instead of a {{isCompatibleVersion}} method, it should only expose a narrower 
> {{int[] getCompatibleVersions}} that the internal version check uses.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to