You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/05 09:30:56 UTC

[GitHub] [flink-ml] gaoyunhaii commented on a change in pull request #11: [FLINK-5][iteration] Add DraftExecutionEnvironment to support wrapping operators during compile time

gaoyunhaii commented on a change in pull request #11:
URL: https://github.com/apache/flink-ml/pull/11#discussion_r722060036



##########
File path: flink-ml-iteration/src/main/java/org/apache/flink/ml/iteration/operator/OperatorWrapper.java
##########
@@ -0,0 +1,36 @@
+/*
+ * 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.ml.iteration.operator;
+
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.streaming.api.operators.StreamOperator;
+import org.apache.flink.streaming.api.operators.StreamOperatorFactory;
+import org.apache.flink.streaming.api.operators.StreamOperatorParameters;
+
+import java.io.Serializable;
+
+/** Wrappers for the given operator factory. */
+public interface OperatorWrapper<T, R> extends Serializable {

Review comment:
       There are two implements in the following PRs as a whole:
   1. AllRoundOperatorWrapper: with this wrapper all the round is processed by a single operator instance.
   2. PerRoundOperatorWrapper: with this wrapper each round of data is processed by a new operator instance. This enables us to reuse the operators defined outside of the iteration. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org