Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 01815200D01 for ; Thu, 7 Sep 2017 20:39:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 00727160CF2; Thu, 7 Sep 2017 18:39:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3D9FE1610C8 for ; Thu, 7 Sep 2017 20:39:13 +0200 (CEST) Received: (qmail 48033 invoked by uid 500); 7 Sep 2017 18:39:12 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 47585 invoked by uid 99); 7 Sep 2017 18:39:12 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Sep 2017 18:39:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3FD95F56E8; Thu, 7 Sep 2017 18:39:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kenn@apache.org To: commits@beam.apache.org Date: Thu, 07 Sep 2017 18:39:16 -0000 Message-Id: <73b31383503240d79f929a5d59d9fd50@git.apache.org> In-Reply-To: <8519f8d6f8f5492d9530d6ca81ad7f65@git.apache.org> References: <8519f8d6f8f5492d9530d6ca81ad7f65@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/36] beam git commit: core-java: InMemoryTimerInternals expose getTimers() for timer firings in mr-runner. archived-at: Thu, 07 Sep 2017 18:39:14 -0000 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 Authored: Thu Jul 27 15:01:22 2017 +0800 Committer: Pei He 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 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.