You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ja...@apache.org on 2018/04/12 23:50:33 UTC
samza git commit: SAMZA-1650: Fix for firing trigger at the end of
trigger interval for tumbling window
Repository: samza
Updated Branches:
refs/heads/master 76de840c7 -> 96c333469
SAMZA-1650: Fix for firing trigger at the end of trigger interval for tumbling window
Author: Aditya Toomula <at...@linkedin.com>
Reviewers: Jagadish <ja...@apache.org>
Closes #472 from atoomula/window
Project: http://git-wip-us.apache.org/repos/asf/samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/96c33346
Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/96c33346
Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/96c33346
Branch: refs/heads/master
Commit: 96c3334693f7d18d087dc5262dddfc7f315d37f1
Parents: 76de840
Author: Aditya Toomula <at...@linkedin.com>
Authored: Thu Apr 12 16:50:30 2018 -0700
Committer: Jagadish <jv...@linkedin.com>
Committed: Thu Apr 12 16:50:30 2018 -0700
----------------------------------------------------------------------
.../main/java/org/apache/samza/execution/JobNode.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/samza/blob/96c33346/samza-core/src/main/java/org/apache/samza/execution/JobNode.java
----------------------------------------------------------------------
diff --git a/samza-core/src/main/java/org/apache/samza/execution/JobNode.java b/samza-core/src/main/java/org/apache/samza/execution/JobNode.java
index c0b4ee5..bc85d00 100644
--- a/samza-core/src/main/java/org/apache/samza/execution/JobNode.java
+++ b/samza-core/src/main/java/org/apache/samza/execution/JobNode.java
@@ -334,17 +334,16 @@ public class JobNode {
.map(spec -> ((JoinOperatorSpec) spec).getTtlMs())
.collect(Collectors.toList());
- if (joinTtlIntervals.isEmpty()) {
- return -1;
- }
-
// Combine both the above lists
List<Long> candidateTimerIntervals = new ArrayList<>(joinTtlIntervals);
candidateTimerIntervals.addAll(windowTimerIntervals);
+ if (candidateTimerIntervals.isEmpty()) {
+ return -1;
+ }
+
// Compute the gcd of the resultant list
- long timerInterval = MathUtils.gcd(candidateTimerIntervals);
- return timerInterval;
+ return MathUtils.gcd(candidateTimerIntervals);
}
/**