core-java: InMemoryTimerInternals expose getTimers() for timer firings in 
mr-runner.


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/d09fb427
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/d09fb427
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/d09fb427

Branch: refs/heads/mr-runner
Commit: d09fb42773daccac01e9e680c52e1666fd03cfe1
Parents: 923190d
Author: Pei He <p...@apache.org>
Authored: Thu Jul 27 15:01:22 2017 +0800
Committer: Pei He <p...@apache.org>
Committed: Thu Aug 31 14:13:47 2017 +0800

----------------------------------------------------------------------
 .../org/apache/beam/runners/core/InMemoryTimerInternals.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/d09fb427/runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
----------------------------------------------------------------------
diff --git 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
index c29ea19..c1d42d6 100644
--- 
a/runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
+++ 
b/runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
@@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkState;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Table;
 import java.util.NavigableSet;
 import java.util.TreeSet;
@@ -65,6 +66,10 @@ public class InMemoryTimerInternals implements 
TimerInternals {
     return outputWatermarkTime;
   }
 
+  public Iterable<TimerData> getTimers(TimeDomain domain) {
+    return ImmutableList.copyOf(timersForDomain(domain));
+  }
+
   /**
    * Returns when the next timer in the given time domain will fire, or {@code 
null}
    * if there are no timers scheduled in that time domain.

Reply via email to