Class LatencyMark
- java.lang.Object
-
- org.apache.nemo.common.punctuation.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 Summary
Constructors Constructor Description LatencyMark(java.lang.String taskId, long timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getCreatedTaskId()
long
getCreatedTimestamp()
long
getPreviousSentTimestamp()
java.lang.String
getPreviousTaskId()
int
hashCode()
void
setPreviousSentTimestamp(long timestamp)
Set the previousSentTimestamp.void
setPreviousTaskId(java.lang.String taskId)
Set the previousTaskId.java.lang.String
toString()
-
-
-
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 classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-