beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [2/4] beam git commit: Add DoFnSignature.usesTimers() shorthand
Date Fri, 20 Jan 2017 21:05:55 GMT
Add DoFnSignature.usesTimers() shorthand


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

Branch: refs/heads/master
Commit: 978ff559f68f1a122346bdbe1a44d2895b598191
Parents: ed434ec
Author: Kenneth Knowles <klk@google.com>
Authored: Wed Jan 18 16:25:51 2017 -0800
Committer: Kenneth Knowles <klk@google.com>
Committed: Fri Jan 20 11:36:39 2017 -0800

----------------------------------------------------------------------
 .../org/apache/beam/sdk/transforms/reflect/DoFnSignature.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/978ff559/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java
b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java
index 5255adc..f470782 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignature.java
@@ -116,6 +116,11 @@ public abstract class DoFnSignature {
     return stateDeclarations().size() > 0;
   }
 
+  /** Whether the {@link DoFn} described by this signature uses timers. */
+  public boolean usesTimers() {
+    return timerDeclarations().size() > 0;
+  }
+
   static Builder builder() {
     return new AutoValue_DoFnSignature.Builder();
   }


Mime
View raw message