You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Felix Wollschläger (JIRA)" <ji...@apache.org> on 2019/07/14 21:10:00 UTC

[jira] [Commented] (FLINK-12782) Show formatted timestamp in Watermark Tab of JM Web UI

    [ https://issues.apache.org/jira/browse/FLINK-12782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16884769#comment-16884769 ] 

Felix Wollschläger commented on FLINK-12782:
--------------------------------------------

Hi [~rmetzger],

thanks for your answer. I know that they don't neccessarily represent an actual time, but in most cases they do. Of course I can only speak for our projects, but I think most of the community assign the event-time to the an actual valid timestamp of the events being processed.

How about adding some configuration for this? A simple watermark-formatter where the users can set an implementing class in the configuration of the JobManager.

For example:

{code}
public interface WatermarkFormatter {
    String format(Watermark watermark);
}

public class NoFormatWatermarkFormatter implements WatermarkFormatter {
    public String format(Watermark watermark) {
        return Long.toString(watermark.getTimestamp());
    }
}

public class TimestampWatermarkFormatter implements WatermarkFormatter {

    private static final ThreadLocal<DateFormat> TL_FORMAT = [...];

    public String format(Watermark watermark) {
        return TL_FORMAT.get().format(new Date(watermark.getTimestamp()));
    }
}
{code}

And the default configuration could be something like this:

{code}
watermark.formatter=org.apache.flink.???.NoFormatWatermarkFormatter
{code}

So the users can decide how the Watermark is shown in the UI.

Best regards,
Felix

> Show formatted timestamp in Watermark Tab of JM Web UI
> ------------------------------------------------------
>
>                 Key: FLINK-12782
>                 URL: https://issues.apache.org/jira/browse/FLINK-12782
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Web Frontend
>            Reporter: Felix Wollschläger
>            Priority: Minor
>
> In the Watermarks Tab of a Flink-Job in the Web UI, show the timestamps as a formatted Date.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)