flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzulitai <...@git.apache.org>
Subject [GitHub] flink pull request #5567: [FLINK-8451] [serializers] Make Scala tuple serial...
Date Fri, 23 Feb 2018 11:38:58 GMT
Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5567#discussion_r170231102
  
    --- 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 --
    
    Could you briefly explain what these are?


---

Mime
View raw message