flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-10656) Refactor org.apache.flink.runtime.io.network.api.reader.ReaderBase
Date Wed, 24 Oct 2018 17:31:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-10656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662587#comment-16662587
] 

ASF GitHub Bot commented on FLINK-10656:
----------------------------------------

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

 ##########
 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:
   well, true from literal, however, isFinished() is only used in iteration scenario. maybe
we can also change the name of it. 

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


> Refactor org.apache.flink.runtime.io.network.api.reader.ReaderBase
> ------------------------------------------------------------------
>
>                 Key: FLINK-10656
>                 URL: https://issues.apache.org/jira/browse/FLINK-10656
>             Project: Flink
>          Issue Type: Improvement
>          Components: Distributed Coordination
>            Reporter: JIN SUN
>            Assignee: JIN SUN
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.8.0
>
>
> The interface of org.apache.flink.runtime.io.network.api.reader.ReaderBase is not very
clean, the API in it are called only by iteration and handle event. which is not related the
name ReaderBase. And the functionality is independent, so propose to change the name and split
the interface to two isolated interface. 
> More details please look at the PR.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message