truncate segmentGranularity

This commit is contained in:
nishantmonu51 2014-08-21 11:40:30 +05:30
parent 8c9d639947
commit fe03476c53
1 changed files with 10 additions and 1 deletions

View File

@ -608,7 +608,16 @@ public class RealtimePlumber implements Plumber
final long windowMillis = windowPeriod.toStandardDuration().getMillis(); final long windowMillis = windowPeriod.toStandardDuration().getMillis();
log.info("Starting merge and push."); log.info("Starting merge and push.");
DateTime minTimestampAsDate = new DateTime(Math.max(windowMillis, rejectionPolicy.getCurrMaxTime().getMillis()) - windowMillis); DateTime minTimestampAsDate = segmentGranularity.truncate(
new DateTime(
Math.max(
windowMillis,
rejectionPolicy.getCurrMaxTime()
.getMillis()
)
- windowMillis
)
);
long minTimestamp = minTimestampAsDate.getMillis(); long minTimestamp = minTimestampAsDate.getMillis();
log.info("Found [%,d] sinks. minTimestamp [%s]", sinks.size(), minTimestampAsDate); log.info("Found [%,d] sinks. minTimestamp [%s]", sinks.size(), minTimestampAsDate);