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

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

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

    https://github.com/apache/flink/pull/5567#discussion_r170247807
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java ---
    @@ -121,10 +121,53 @@ public ClassLoaderObjectInputStream(InputStream in, 
ClassLoader classLoader) thr
                
scalaSerializerClassnames.add("org.apache.flink.api.scala.typeutils.EnumValueSerializer");
                
scalaSerializerClassnames.add("org.apache.flink.api.scala.typeutils.OptionSerializer");
                
scalaSerializerClassnames.add("org.apache.flink.api.scala.typeutils.TrySerializer");
    -           
scalaSerializerClassnames.add("org.apache.flink.api.scala.typeutils.EitherSerializer");
                
scalaSerializerClassnames.add("org.apache.flink.api.scala.typeutils.UnitSerializer");
        }
     
    +   /**
    +    * The serialVersionUID might change between Scala versions and since 
those classes are
    +    * part of the tuple serializer config snapshots we need to ignore them.
    +    *
    +    * See also FLINK-8451.
    +    */
    +   private static Set<String> scalaTypes = new HashSet<>();
    +   static {
    +           scalaTypes.add("scala.Tuple1");
    +           scalaTypes.add("scala.Tuple2");
    +           scalaTypes.add("scala.Tuple3");
    +           scalaTypes.add("scala.Tuple4");
    +           scalaTypes.add("scala.Tuple5");
    +           scalaTypes.add("scala.Tuple6");
    +           scalaTypes.add("scala.Tuple7");
    +           scalaTypes.add("scala.Tuple8");
    +           scalaTypes.add("scala.Tuple9");
    +           scalaTypes.add("scala.Tuple10");
    +           scalaTypes.add("scala.Tuple11");
    +           scalaTypes.add("scala.Tuple12");
    +           scalaTypes.add("scala.Tuple13");
    +           scalaTypes.add("scala.Tuple14");
    +           scalaTypes.add("scala.Tuple15");
    +           scalaTypes.add("scala.Tuple16");
    +           scalaTypes.add("scala.Tuple17");
    +           scalaTypes.add("scala.Tuple18");
    +           scalaTypes.add("scala.Tuple19");
    +           scalaTypes.add("scala.Tuple20");
    +           scalaTypes.add("scala.Tuple21");
    +           scalaTypes.add("scala.Tuple22");
    +           scalaTypes.add("scala.Tuple1$mcJ$sp");
    +           scalaTypes.add("scala.Tuple1$mcI$sp");
    --- End diff --
    
    These anonymous classes are used for type specific tuples. Like `II` for a 
`(Int, Int)`. I don't know exactly when they are inserted by the compiler but I 
added them just to be sure.


> CaseClassSerializer is not backwards compatible in 1.4
> ------------------------------------------------------
>
>                 Key: FLINK-8451
>                 URL: https://issues.apache.org/jira/browse/FLINK-8451
>             Project: Flink
>          Issue Type: Bug
>          Components: Type Serialization System
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>            Priority: Blocker
>             Fix For: 1.5.0, 1.4.2
>
>
> There seems to be problems with the updated Scala version and the 
> CaseClassSerializer that make it impossible to restore from a Flink 1.3 
> savepoint.
> http://mail-archives.apache.org/mod_mbox/flink-user/201801.mbox/%3CCACk7FThV5itjSj_1fG9oaWS86z8WTKWs7abHvok6FnHzq9XT-A%40mail.gmail.com%3E
> http://mail-archives.apache.org/mod_mbox/flink-user/201801.mbox/%3C7CABB00B-D52F-4878-B04F-201415CEB658%40mediamath.com%3E



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

Reply via email to