You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by yanghua <gi...@git.apache.org> on 2018/07/18 15:24:13 UTC
[GitHub] flink pull request #6367: [FLINK-9850] Add a string to the print method to i...
GitHub user yanghua opened a pull request:
https://github.com/apache/flink/pull/6367
[FLINK-9850] Add a string to the print method to identify output for DataStream
## What is the purpose of the change
*This pull request adds a string to the print method to identify output for DataStream*
## Brief change log
- *add print(string) / printToErr(string) to DataStream Java API*
- *add print(string) / printToErr(string) to DataStream Scala API*
- *add print(string) to DataStream Python API*
## 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): (yes / **no**)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**yes** / no)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (not applicable / **docs** / **JavaDocs** / not documented)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yanghua/flink FLINK-9850
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6367.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #6367
----
commit 80215cd12618392ab0909a431863939d3353ca16
Author: yanghua <ya...@...>
Date: 2018-07-18T15:20:11Z
[FLINK-9850] Add a string to the print method to identify output for DataStream
----
---
[GitHub] flink issue #6367: [FLINK-9850] Add a string to the print method to identify...
Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on the issue:
https://github.com/apache/flink/pull/6367
@hequn8128 thanks, I have added some test case~
---
[GitHub] flink issue #6367: [FLINK-9850] Add a string to the print method to identify...
Posted by tison1 <gi...@git.apache.org>.
Github user tison1 commented on the issue:
https://github.com/apache/flink/pull/6367
@yanghua also +1
this is a net win.
---
[GitHub] flink issue #6367: [FLINK-9850] Add a string to the print method to identify...
Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on the issue:
https://github.com/apache/flink/pull/6367
cc @dawidwys and @pnowojski
---
[GitHub] flink issue #6367: [FLINK-9850] Add a string to the print method to identify...
Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on the issue:
https://github.com/apache/flink/pull/6367
@tillrohrmann and @zentol I see the Python DataStream API methods do not match DataStream Java API methods (missed some API methods), Shall we add those missed API into `PythonDataStream`? If yes, I'd like to do this.
---
[GitHub] flink pull request #6367: [FLINK-9850] Add a string to the print method to i...
Posted by tison1 <gi...@git.apache.org>.
Github user tison1 commented on a diff in the pull request:
https://github.com/apache/flink/pull/6367#discussion_r203644208
--- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/PrintSinkFunction.java ---
@@ -40,6 +40,8 @@
private boolean target;
private transient PrintStream stream;
private transient String prefix;
+ private String sinkIdentifier;
+ private String completedPrefix;
--- End diff --
if `prefix` is `transient`, why not `completedPrefix`?
---
[GitHub] flink issue #6367: [FLINK-9850] Add a string to the print method to identify...
Posted by hequn8128 <gi...@git.apache.org>.
Github user hequn8128 commented on the issue:
https://github.com/apache/flink/pull/6367
@yanghua Thanks for your update. +1 to merge
---
[GitHub] flink pull request #6367: [FLINK-9850] Add a string to the print method to i...
Posted by hequn8128 <gi...@git.apache.org>.
Github user hequn8128 commented on a diff in the pull request:
https://github.com/apache/flink/pull/6367#discussion_r203588835
--- Diff: flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala ---
@@ -959,6 +959,29 @@ class DataStream[T](stream: JavaStream[T]) {
@PublicEvolving
def printToErr() = stream.printToErr()
+ /**
+ * Writes a DataStream to the standard output stream (stdout). For each
+ * element of the DataStream the result of .toString is
--- End diff --
.toString => [[AnyRef.toString()]]
---