Hi chrisr,

The document is misleading. Only DataSet api support prefixed print now. I
create a jira for DataStream[1].
For now, you can use a customed SinkFunction to achieve this.

[1]. https://issues.apache.org/jira/browse/FLINK-9850

On Sat, Jul 14, 2018 at 10:34 PM, chrisr123 <chris.rueg...@gmail.com> wrote:

>
> The documentation states that there is a way to specify a prefix msg to
> distinguish between different calls to print() (see below), but I have not
> found a way to do this? Can anyone show me how I would code this?
>
> What I'd like to do conceptually, and have the prefix msg show up in the
> output so I know where I am
> in the transformation process:
>
> DataStream<String> myStream = ...
> myStream.print("beforeFilter");
>
>
> DataStream<String> myFilteredStream = myStream.filter(new MyFilter());
> myFilteredStream.print("afterFilter");
>
>
> From Docs:
> print() / printToErr() - Prints the toString() value of each element on the
> standard out / standard error stream. Optionally, a prefix (msg) can be
> provided which is prepended to the output. This can help to distinguish
> between different calls to print. If the parallelism is greater than 1, the
> output will also be prepended with the identifier of the task which
> produced
> the output.
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>

Reply via email to