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/19 09:32:42 UTC

[GitHub] [flink-ml] guoweiM commented on a change in pull request #5: [FLINK-1][iteration] Adds the iteration module and API

guoweiM commented on a change in pull request #5:
URL: https://github.com/apache/flink-ml/pull/5#discussion_r731632829



##########
File path: flink-ml-iteration/src/main/java/org/apache/flink/iteration/IterationBody.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iteration;
+
+import org.apache.flink.annotation.Experimental;
+
+/**
+ * The builder of the subgraph that will be executed inside the iteration.
+ *
+ * <p>Notes that inside the iteration body, users could only create the subgraph from the {@code
+ * variableStreams} and {@code dataStreams}. Users could not refers to other data stream outside the
+ * iteration through the closure, and could not add new sources / sinks inside the iteration.
+ *
+ * <p>The iteration body also requires that he parallelism of any stream in the initial variable

Review comment:
       he -> the?

##########
File path: flink-ml-iteration/src/main/java/org/apache/flink/iteration/IterationBody.java
##########
@@ -0,0 +1,48 @@
+/*
+ * 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.iteration;
+
+import org.apache.flink.annotation.Experimental;
+
+/**
+ * The builder of the subgraph that will be executed inside the iteration.
+ *
+ * <p>Notes that inside the iteration body, users could only create the subgraph from the {@code
+ * variableStreams} and {@code dataStreams}. Users could not refers to other data stream outside the
+ * iteration through the closure, and could not add new sources / sinks inside the iteration.
+ *
+ * <p>The iteration body also requires that he parallelism of any stream in the initial variable
+ * streams must equal to the parallelism of the stream at the same index of the feedback variable
+ * streams returned by the IterationBody.
+ */
+@Experimental
+public interface IterationBody {
+
+    /**
+     * This method creates the graph for the iteration body. See {@link Iterations} for how the
+     * iteration body can be executed and terminated.
+     *
+     * @param variableStreams the variable streams, which will be updated via a feedback stream in
+     *     each round.
+     * @param dataStreams the streams referred in the iteration body, which will only be emitted in

Review comment:
       The java doc of `iterateAndReplayBoundedStreamsUntilTermination` say that it would replay the dataStreams (if I understand right)?




-- 
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