You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2025/03/17 12:50:42 UTC

[PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

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

   ## What is the purpose of the change
   
   This PR aim to improve the code for `PrintSinkOutputWriter`, `PrintSinkFunction` and `PrintSink`.
   
   1.  Rename target with a meaning name.
   2. Simplify the code like `stream = target == STD_OUT ? System.out : System.err;`.
   
   
   ## Brief change log
   
   Simplify the code for `PrintSink`
   
   
   ## Verifying this change
   
   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): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   
   


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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

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

   @1996fanrui @davidradl Thanks for all your help.


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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

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

   ping @zentol @1996fanrui @davidradl cc  @ifndef-SleePy


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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui commented on code in PR #26309:
URL: https://github.com/apache/flink/pull/26309#discussion_r2005180013


##########
flink-core/src/main/java/org/apache/flink/api/common/functions/util/PrintSinkOutputWriter.java:
##########
@@ -33,7 +33,7 @@ public class PrintSinkOutputWriter<IN> implements Serializable, SinkWriter<IN> {
     private static final boolean STD_OUT = false;
     private static final boolean STD_ERR = true;
 

Review Comment:
   ```suggestion
   ```
   
   Could these 2 lines be removed after refactoring the target to `isStdErr`?



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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

Posted by "1996fanrui (via GitHub)" <gi...@apache.org>.
1996fanrui merged PR #26309:
URL: https://github.com/apache/flink/pull/26309


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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

Posted by "beliefer (via GitHub)" <gi...@apache.org>.
beliefer commented on code in PR #26309:
URL: https://github.com/apache/flink/pull/26309#discussion_r2005193011


##########
flink-core/src/main/java/org/apache/flink/api/common/functions/util/PrintSinkOutputWriter.java:
##########
@@ -33,7 +33,7 @@ public class PrintSinkOutputWriter<IN> implements Serializable, SinkWriter<IN> {
     private static final boolean STD_OUT = false;
     private static final boolean STD_ERR = true;
 

Review Comment:
   Good thinking.



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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d7bdce35440e9528d874fc06db512f5da8daa047",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d7bdce35440e9528d874fc06db512f5da8daa047",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d7bdce35440e9528d874fc06db512f5da8daa047 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


Re: [PR] [FLINK-37482] Improve the code for PrintSinkOutputWriter, PrintSinkFunction and PrintSink [flink]

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

   cc @GOODBOY008 


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