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 2022/07/22 03:25:04 UTC

[GitHub] [flink] DavidLiu001 opened a new pull request, #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

DavidLiu001 opened a new pull request, #20338:
URL: https://github.com/apache/flink/pull/20338

   …nkWriter
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. 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.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [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] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - 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.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - 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
   
   Change the abstract method's parameter naming in AsyncSinkWriter and AsyncSinkWriterTest
   
   From  Consumer<List<RequestEntryT>> requestResult
   to  Consumer<List<RequestEntryT>> requestToRetry
   
   This is because the consumer here is supposed to accept a list of requests that need to be retried.
   
   ## Brief change log
   flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java
   flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriterTest.java
   Just rename the parameter of requestResult to requestToRetry
   
   ## Verifying this change
   
   Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)     no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / no)    no
     - The serializers: (yes / no / don't know)    no
     - The runtime per-record code paths (performance sensitive): (yes / no / don't know)    no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)    no
     - The S3 file system connector: (yes / no / don't know)    no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)    no
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   


-- 
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] DavidLiu001 commented on a diff in pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 commented on code in PR #20338:
URL: https://github.com/apache/flink/pull/20338#discussion_r927431507


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -170,30 +170,30 @@
      * the valid limits of the destination). The logic then needs to create and execute the request
      * asynchronously against the destination (ideally by batching together multiple request entries
      * to increase efficiency). The logic also needs to identify individual request entries that
-     * were not persisted successfully and resubmit them using the {@code requestResult} callback.
+     * were not persisted successfully and resubmit them using the {@code requestToRetry} callback.

Review Comment:
   For example, it is used to call the method of accept() ->  requestToRetry.accept(retryableFailedRecords)
   @dannycranmer  If you still think requestsToRetry is better, I will change to  requestsToRetry



-- 
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] dannycranmer commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1195074655

   @DavidLiu001 in future instead of opening a new PR, you can simply push a new commit to you branch and the PR will automatically update? You can even squash and force push to rewrite the branch completely. Thanks.


-- 
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] flinkbot commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1192143162

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "08644a67984c781772cfdef6b1f99abbcd07a4ad",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "08644a67984c781772cfdef6b1f99abbcd07a4ad",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 08644a67984c781772cfdef6b1f99abbcd07a4ad UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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] dannycranmer commented on a diff in pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on code in PR #20338:
URL: https://github.com/apache/flink/pull/20338#discussion_r928602761


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -170,30 +170,30 @@
      * the valid limits of the destination). The logic then needs to create and execute the request
      * asynchronously against the destination (ideally by batching together multiple request entries
      * to increase efficiency). The logic also needs to identify individual request entries that
-     * were not persisted successfully and resubmit them using the {@code requestResult} callback.
+     * were not persisted successfully and resubmit them using the {@code requestToRetry} callback.

Review Comment:
   ok makes sense 



-- 
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] dannycranmer commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1193745403

   @DavidLiu001 you have a [build failure](https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=38572&view=logs&j=52b61abe-a3cc-5bde-cc35-1bbe89bb7df5&t=54421a62-0c80-5aad-3319-094ff69180bb) on the CI. Can you please address this and then I will merge. Thanks


-- 
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] DavidLiu001 commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1196217231

   Nice,  I will follow your suggestion for the later 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] dannycranmer commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1196371272

   Superseded by https://github.com/apache/flink/pull/20360


-- 
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] DavidLiu001 commented on a diff in pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 commented on code in PR #20338:
URL: https://github.com/apache/flink/pull/20338#discussion_r927431507


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -170,30 +170,30 @@
      * the valid limits of the destination). The logic then needs to create and execute the request
      * asynchronously against the destination (ideally by batching together multiple request entries
      * to increase efficiency). The logic also needs to identify individual request entries that
-     * were not persisted successfully and resubmit them using the {@code requestResult} callback.
+     * were not persisted successfully and resubmit them using the {@code requestToRetry} callback.

Review Comment:
   For example, it is used to call the method of accept() ->  requestToRetry.accept(retryableFailedRecords)
   @dannycranmer  If you still think requestsToRetry is better, I will change it to  requestsToRetry



-- 
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] DavidLiu001 closed pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 closed pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…
URL: https://github.com/apache/flink/pull/20338


-- 
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] DavidLiu001 commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1195003585

   Close this pull request and I Will open a new Pull Request


-- 
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] dannycranmer commented on a diff in pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
dannycranmer commented on code in PR #20338:
URL: https://github.com/apache/flink/pull/20338#discussion_r927373779


##########
flink-connectors/flink-connector-base/src/main/java/org/apache/flink/connector/base/sink/writer/AsyncSinkWriter.java:
##########
@@ -170,30 +170,30 @@
      * the valid limits of the destination). The logic then needs to create and execute the request
      * asynchronously against the destination (ideally by batching together multiple request entries
      * to increase efficiency). The logic also needs to identify individual request entries that
-     * were not persisted successfully and resubmit them using the {@code requestResult} callback.
+     * were not persisted successfully and resubmit them using the {@code requestToRetry} callback.

Review Comment:
   I understand the Jira said `requestToRetry`, but given this is a `List<>` I think a better name would be `requestsToRetry`, what do you think?



-- 
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] DavidLiu001 commented on pull request #20338: [FLINK-27536][Connectors / Common] Rename method parameter in AsyncSi…

Posted by GitBox <gi...@apache.org>.
DavidLiu001 commented on PR #20338:
URL: https://github.com/apache/flink/pull/20338#issuecomment-1196217453

   Nice,  I will follow your suggestion for the later 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