pnowojski commented on a change in pull request #6367: [FLINK-9850] Add a 
string to the print method to identify output for DataStream
URL: https://github.com/apache/flink/pull/6367#discussion_r209234301
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/PrintSinkFunction.java
 ##########
 @@ -55,6 +57,17 @@ public PrintSinkFunction(boolean stdErr) {
                target = stdErr;
        }
 
+       /**
+        * Instantiates a print sink function that prints to standard out and 
gives a sink identifier.
+        *
+        * @param stdErr True, if the format should print to standard error 
instead of standard out.
+        * @param sinkIdentifier Message that identify sink and is prefixed to 
the output of the value
+        */
+       public PrintSinkFunction(boolean stdErr, String sinkIdentifier) {
+               this(stdErr);
+               this.sinkIdentifier = sinkIdentifier;
 
 Review comment:
   Usually less detailed constructor is calling the more specific ones, not the 
other way around. Here it will allow you to mark fields as `final`

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


With regards,
Apache Git Services

Reply via email to