StreamElement在Flink中叫做据流元素。包含StreamRecord,LatencyMarker,Watermark,StreamStatus
一、StreamRecord
StreamRecord表示数据流中的一条记录(一个事件)
1、数据值
2、时间戳
public StreamRecord(T value, long timestamp) { this.value = value; this.timestamp = timestamp; this.hasTimestamp = true; }
二、LatencyMarker
用来近似评估延迟,LatencyMarker在Source中创建,向下游发送,绕过业务处理逻辑。在Sink节点中使用估计数据在整个DAG图中流转花费的时间,用来近似评估总体上的处理延迟。
1、周期性在数据源算子中创建出来的时间戳
2、算子编号
3、数据源算子所在Task的编号
public LatencyMarker(long markedTime, OperatorID operatorId, int subtaskIndex) {