Class LatencyMark

  • All Implemented Interfaces:
    java.io.Serializable

    public final class LatencyMark
    extends java.lang.Object
    implements java.io.Serializable
    Latency mark is a watermark with the data related to stream data latencies. It is created only from source vertex, with the data of when (timestamp) and where (taskId) it was created. Later tasks can infer the latency according to the time that the latencyMark arrives to the task. When the latencyMark arrives in a task, it leaves its record with its task id and timestamp, and later tasks can track the itinerary by looking at the recorded previous task id and timestamp.
    See Also:
    Serialized Form
    • Constructor Detail

      • LatencyMark

        public LatencyMark​(java.lang.String taskId,
                           long timestamp)
        Parameters:
        taskId - task id of where it was created
        timestamp - timestamp of when it was created
    • Method Detail

      • getCreatedTimestamp

        public long getCreatedTimestamp()
        Returns:
        the timestamp of when this latencyMark was first created.
      • getCreatedTaskId

        public java.lang.String getCreatedTaskId()
        Returns:
        the task id of where it was created.
      • getPreviousTaskId

        public java.lang.String getPreviousTaskId()
        Returns:
        the task id of task that this latency mark was previously passed on by.
      • getPreviousSentTimestamp

        public long getPreviousSentTimestamp()
        Returns:
        the time stamp when this latency mark was previously passed on by a task.
      • setPreviousTaskId

        public void setPreviousTaskId​(java.lang.String taskId)
        Set the previousTaskId.
        Parameters:
        taskId - the task id of where this latencyMark has gone through previously.
      • setPreviousSentTimestamp

        public void setPreviousSentTimestamp​(long timestamp)
        Set the previousSentTimestamp.
        Parameters:
        timestamp - the timestamp of when this latencyMark was sent from a previous task.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object