public class GlobalWatermarkHolder
extends java.lang.Object
BlockStore
variable to hold the global watermarks for a micro-batch.
For each source, holds a queue for the watermarks of each micro-batch that was read, and advances the watermarks according to the queue (first-in-first-out).
Modifier and Type | Class and Description |
---|---|
static class |
GlobalWatermarkHolder.SparkWatermarks
A
GlobalWatermarkHolder.SparkWatermarks holds the watermarks and batch time
relevant to a micro-batch input from a specific source. |
static class |
GlobalWatermarkHolder.WatermarkAdvancingStreamingListener
Advance the WMs onBatchCompleted event.
|
Constructor and Description |
---|
GlobalWatermarkHolder() |
Modifier and Type | Method and Description |
---|---|
static void |
add(int sourceId,
GlobalWatermarkHolder.SparkWatermarks sparkWatermarks) |
static void |
addAll(java.util.Map<java.lang.Integer,java.util.Queue<GlobalWatermarkHolder.SparkWatermarks>> sourceTimes) |
static void |
advance()
See
advance(String) . |
static void |
advance(java.lang.String batchId)
Advances the watermarks to the next-in-line watermarks.
|
static void |
clear() |
static java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> |
get(java.lang.Long cacheInterval)
Returns the
Broadcast containing the GlobalWatermarkHolder.SparkWatermarks mapped
to their sources. |
static long |
getLastWatermarkedBatchTime() |
public static void add(int sourceId, GlobalWatermarkHolder.SparkWatermarks sparkWatermarks)
public static void addAll(java.util.Map<java.lang.Integer,java.util.Queue<GlobalWatermarkHolder.SparkWatermarks>> sourceTimes)
public static long getLastWatermarkedBatchTime()
public static java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> get(java.lang.Long cacheInterval)
Broadcast
containing the GlobalWatermarkHolder.SparkWatermarks
mapped
to their sources.public static void advance(java.lang.String batchId)
public static void advance()
advance(String)
.public static void clear()