1) Fix truncation math when figuring out what Segments to persist for realtime plumber. Previously, Sinks could get persist-n-merged without actually being ready to be persist-n-merged. Fixes #168

This commit is contained in:
cheddar 2013-06-19 11:15:58 -07:00
parent c4a3a9b2fc
commit 369412262e
1 changed files with 3 additions and 2 deletions

View File

@ -514,8 +514,9 @@ public class RealtimePlumberSchool implements PlumberSchool
log.info("Starting merge and push."); log.info("Starting merge and push.");
long minTimestamp = segmentGranularity.truncate(rejectionPolicy.getCurrMaxTime()).getMillis() long minTimestamp = segmentGranularity.truncate(
- windowMillis; rejectionPolicy.getCurrMaxTime().minus(windowMillis)
).getMillis();
List<Map.Entry<Long, Sink>> sinksToPush = Lists.newArrayList(); List<Map.Entry<Long, Sink>> sinksToPush = Lists.newArrayList();
for (Map.Entry<Long, Sink> entry : sinks.entrySet()) { for (Map.Entry<Long, Sink> entry : sinks.entrySet()) {