You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "jiangxin369 (via GitHub)" <gi...@apache.org> on 2023/04/10 04:34:04 UTC

[GitHub] [flink-ml] jiangxin369 opened a new pull request, #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

jiangxin369 opened a new pull request, #231:
URL: https://github.com/apache/flink-ml/pull/231

   <!--
   *Thank you very much for contributing to Apache Flink ML - we are happy that you want to help us improve Flink ML. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to one [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] Title of the pull request`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   Make the ProxyStreamPartitioner implement ConfigurableStreamPartitioner. Otherwise, the KeyGroupRange that is computed in StreamTaskStateInitializerImpl.java doesn't match the subTaskId that is computed in KeyGroupStreamPartitioner.java.
   
   ## Brief change log
   
     - Make the ProxyStreamPartitioner implement ConfigurableStreamPartitioner.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   


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


[GitHub] [flink-ml] jiangxin369 commented on pull request #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

Posted by "jiangxin369 (via GitHub)" <gi...@apache.org>.
jiangxin369 commented on PR #231:
URL: https://github.com/apache/flink-ml/pull/231#issuecomment-1504431951

   @zhipeng93 Thanks for the review, I've updated the PR.


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


[GitHub] [flink-ml] jiangxin369 commented on pull request #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

Posted by "jiangxin369 (via GitHub)" <gi...@apache.org>.
jiangxin369 commented on PR #231:
URL: https://github.com/apache/flink-ml/pull/231#issuecomment-1501661163

   @zhipeng93 Could you help review this PR?


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


[GitHub] [flink-ml] zhipeng93 merged pull request #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

Posted by "zhipeng93 (via GitHub)" <gi...@apache.org>.
zhipeng93 merged PR #231:
URL: https://github.com/apache/flink-ml/pull/231


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


[GitHub] [flink-ml] zhipeng93 commented on a diff in pull request #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

Posted by "zhipeng93 (via GitHub)" <gi...@apache.org>.
zhipeng93 commented on code in PR #231:
URL: https://github.com/apache/flink-ml/pull/231#discussion_r1162807385


##########
flink-ml-iteration/src/main/java/org/apache/flink/iteration/proxy/ProxyStreamPartitioner.java:
##########
@@ -98,4 +100,12 @@ public int selectChannel(SerializationDelegate<StreamRecord<IterationRecord<T>>>
     public String toString() {
         return wrappedStreamPartitioner.toString();
     }
+
+    @Override
+    public void configure(int maxParallelism) {
+        if (wrappedStreamPartitioner instanceof ConfigurableStreamPartitioner) {
+            ((ConfigurableStreamPartitioner) this.wrappedStreamPartitioner)

Review Comment:
   nit: Let's move `this.` for consistency.



##########
flink-ml-iteration/src/main/java/org/apache/flink/iteration/proxy/ProxyStreamPartitioner.java:
##########
@@ -98,4 +100,12 @@ public int selectChannel(SerializationDelegate<StreamRecord<IterationRecord<T>>>
     public String toString() {
         return wrappedStreamPartitioner.toString();
     }
+
+    @Override
+    public void configure(int maxParallelism) {
+        if (wrappedStreamPartitioner instanceof ConfigurableStreamPartitioner) {
+            ((ConfigurableStreamPartitioner) this.wrappedStreamPartitioner)

Review Comment:
   nit: Let's remove `this.` for consistency.



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


[GitHub] [flink-ml] zhipeng93 commented on pull request #231: [FLINK-31374] ProxyStreamPartitioner should implement ConfigurableStreamPartitioner

Posted by "zhipeng93 (via GitHub)" <gi...@apache.org>.
zhipeng93 commented on PR #231:
URL: https://github.com/apache/flink-ml/pull/231#issuecomment-1504703810

   Thanks for the update. LGTM.


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