public class SparkTimerInternals
extends java.lang.Object
implements org.apache.beam.runners.core.TimerInternals
TimerInternals
for the SparkRunner.Modifier and Type | Method and Description |
---|---|
void |
advanceWatermark()
Advances the watermark.
|
Instant |
currentInputWatermarkTime() |
Instant |
currentOutputWatermarkTime() |
Instant |
currentProcessingTime() |
Instant |
currentSynchronizedProcessingTime() |
void |
deleteTimer(org.apache.beam.runners.core.StateNamespace namespace,
java.lang.String timerId) |
void |
deleteTimer(org.apache.beam.runners.core.StateNamespace namespace,
java.lang.String timerId,
TimeDomain timeDomain) |
void |
deleteTimer(org.apache.beam.runners.core.TimerInternals.TimerData timer) |
static java.util.Iterator<org.apache.beam.runners.core.TimerInternals.TimerData> |
deserializeTimers(java.util.Collection<byte[]> serTimers,
org.apache.beam.runners.core.TimerInternals.TimerDataCoderV2 timerDataCoder) |
static SparkTimerInternals |
forStreamFromSources(java.util.List<java.lang.Integer> sourceIds,
java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> watermarks)
Build the
TimerInternals according to the feeding streams. |
java.util.Collection<org.apache.beam.runners.core.TimerInternals.TimerData> |
getTimers() |
static SparkTimerInternals |
global(java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> watermarks)
Build a global
TimerInternals for all feeding streams. |
static java.util.Collection<byte[]> |
serializeTimers(java.util.Collection<org.apache.beam.runners.core.TimerInternals.TimerData> timers,
org.apache.beam.runners.core.TimerInternals.TimerDataCoderV2 timerDataCoder) |
void |
setTimer(org.apache.beam.runners.core.StateNamespace namespace,
java.lang.String timerId,
java.lang.String timerFamilyId,
Instant target,
Instant outputTimestamp,
TimeDomain timeDomain) |
void |
setTimer(org.apache.beam.runners.core.TimerInternals.TimerData timer) |
java.lang.String |
toString() |
public static SparkTimerInternals forStreamFromSources(java.util.List<java.lang.Integer> sourceIds, java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> watermarks)
TimerInternals
according to the feeding streams.public static SparkTimerInternals global(java.util.Map<java.lang.Integer,GlobalWatermarkHolder.SparkWatermarks> watermarks)
TimerInternals
for all feeding streams.public java.util.Collection<org.apache.beam.runners.core.TimerInternals.TimerData> getTimers()
public void setTimer(org.apache.beam.runners.core.TimerInternals.TimerData timer)
setTimer
in interface org.apache.beam.runners.core.TimerInternals
public void deleteTimer(org.apache.beam.runners.core.StateNamespace namespace, java.lang.String timerId, TimeDomain timeDomain)
deleteTimer
in interface org.apache.beam.runners.core.TimerInternals
public void deleteTimer(org.apache.beam.runners.core.TimerInternals.TimerData timer)
deleteTimer
in interface org.apache.beam.runners.core.TimerInternals
public Instant currentProcessingTime()
currentProcessingTime
in interface org.apache.beam.runners.core.TimerInternals
@Nullable public Instant currentSynchronizedProcessingTime()
currentSynchronizedProcessingTime
in interface org.apache.beam.runners.core.TimerInternals
public Instant currentInputWatermarkTime()
currentInputWatermarkTime
in interface org.apache.beam.runners.core.TimerInternals
public void advanceWatermark()
@Nullable public Instant currentOutputWatermarkTime()
currentOutputWatermarkTime
in interface org.apache.beam.runners.core.TimerInternals
public void setTimer(org.apache.beam.runners.core.StateNamespace namespace, java.lang.String timerId, java.lang.String timerFamilyId, Instant target, Instant outputTimestamp, TimeDomain timeDomain)
setTimer
in interface org.apache.beam.runners.core.TimerInternals
public void deleteTimer(org.apache.beam.runners.core.StateNamespace namespace, java.lang.String timerId)
deleteTimer
in interface org.apache.beam.runners.core.TimerInternals
public static java.util.Collection<byte[]> serializeTimers(java.util.Collection<org.apache.beam.runners.core.TimerInternals.TimerData> timers, org.apache.beam.runners.core.TimerInternals.TimerDataCoderV2 timerDataCoder)
public static java.util.Iterator<org.apache.beam.runners.core.TimerInternals.TimerData> deserializeTimers(java.util.Collection<byte[]> serTimers, org.apache.beam.runners.core.TimerInternals.TimerDataCoderV2 timerDataCoder)
public java.lang.String toString()
toString
in class java.lang.Object