[
https://issues.apache.org/jira/browse/FLINK-10789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16676988#comment-16676988
]
ASF GitHub Bot commented on FLINK-10789:
----------------------------------------
StefanRRichter commented on a change in pull request #7028: [FLINK-10789] New
serializer snapshots after 1.6 should implement TypeSerializerSnapshot
URL: https://github.com/apache/flink/pull/7028#discussion_r231202779
##########
File path:
flink-scala/src/main/java/org/apache/flink/api/scala/typeutils/ScalaEitherSerializerSnapshot.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.flink.api.scala.typeutils;
+
+import org.apache.flink.api.common.typeutils.CompositeSerializerSnapshot;
+import org.apache.flink.api.common.typeutils.TypeSerializer;
+import org.apache.flink.api.common.typeutils.TypeSerializerSchemaCompatibility;
+import org.apache.flink.api.common.typeutils.TypeSerializerSnapshot;
+import org.apache.flink.core.memory.DataInputView;
+import org.apache.flink.core.memory.DataOutputView;
+import org.apache.flink.util.Preconditions;
+
+import java.io.IOException;
+
+import scala.util.Either;
+
+import static org.apache.flink.util.Preconditions.checkState;
+
+/**
+ * Configuration snapshot for serializers of Scala's {@link Either} type,
+ * containing configuration snapshots of the Left and Right serializers.
+ */
+public class ScalaEitherSerializerSnapshot<L, R> implements
TypeSerializerSnapshot<Either<L, R>> {
+
+
Review comment:
2 newlines.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Some new serializer snapshots added after 1.6 are not implementing the new
> TypeSerializerSnapshot interface
> -----------------------------------------------------------------------------------------------------------
>
> Key: FLINK-10789
> URL: https://issues.apache.org/jira/browse/FLINK-10789
> Project: Flink
> Issue Type: Improvement
> Components: Type Serialization System
> Reporter: Tzu-Li (Gordon) Tai
> Assignee: Tzu-Li (Gordon) Tai
> Priority: Critical
> Labels: pull-request-available
>
> In commit
> [3787b89105c6a005ddca999b0b8a0356e812ede6|[https://github.com/apache/flink/commit/3787b89105c6a005ddca999b0b8a0356e812ede6],]
> there were a few serializer snapshot implementations that were newly added,
> namely:
> - {{LockableSerializerConfigSnapshot}}
> - {{ListViewSerializerConfigSnapshot}}
> - {{MapViewSerializerConfigSnapshot}}
> - {{ScalaEitherSerializerConfigSnapshot}}
> The problem is that instead of implementing the newer
> {{TypeSerializerSnapshot}}, they are extending the legacy deprecated
> {{TypeSerializerConfigSnapshot}}. This doesn't break things, but we will be
> redundantly writing Java-serialized with the new snapshots, as well as
> causing us to must introduce migration paths code later on after releasing
> them.
> It would be more ideal to implement them properly as
> {{TypeSerializerSnapshot}} for the release.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)