flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zhijiangW commented on a change in pull request #6911: [FLINK-10656] Refactor org.apache.flink.runtime.io.network.api.reader…
Date Wed, 24 Oct 2018 06:18:01 GMT
zhijiangW commented on a change in pull request #6911: [FLINK-10656] Refactor org.apache.flink.runtime.io.network.api.reader…
URL: https://github.com/apache/flink/pull/6911#discussion_r227654121
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/reader/IterationReader.java
 ##########
 @@ -21,34 +21,21 @@
 import org.apache.flink.runtime.event.TaskEvent;
 import org.apache.flink.runtime.util.event.EventListener;
 
-import java.io.IOException;
-
 /**
- * The basic API for every reader.
+ * Reader for iteration.
  */
-public interface ReaderBase {
-
-	/**
-	 * Returns whether the reader has consumed the input.
-	 */
-	boolean isFinished();
-
-	// ------------------------------------------------------------------------
-	// Task events
-	// ------------------------------------------------------------------------
-
-	void sendTaskEvent(TaskEvent event) throws IOException;
-
-	void registerTaskEventListener(EventListener<TaskEvent> listener, Class<? extends
TaskEvent> eventType);
-
-	// ------------------------------------------------------------------------
-	// Iterations
-	// ------------------------------------------------------------------------
+public interface IterationReader {
 
 	void setIterativeReader();
 
 	void startNextSuperstep();
 
 	boolean hasReachedEndOfSuperstep();
 
+	/**
+	 * Returns whether the reader has consumed the input.
+	 */
+	boolean isFinished();
 
 Review comment:
   I think `isFinished` method is not strong correlation of iteration, and it should be a
very common method suitable for all readers.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message