mirror of https://github.com/apache/druid.git
review comment - better way to handle it
This commit is contained in:
parent
87b83e7bdb
commit
8c9d639947
|
@ -608,14 +608,7 @@ public class RealtimePlumber implements Plumber
|
|||
|
||||
final long windowMillis = windowPeriod.toStandardDuration().getMillis();
|
||||
log.info("Starting merge and push.");
|
||||
DateTime minTimestampAsDate;
|
||||
try {
|
||||
minTimestampAsDate = segmentGranularity.truncate(rejectionPolicy.getCurrMaxTime().minus(windowMillis));
|
||||
}
|
||||
catch (ArithmeticException e) {
|
||||
//thrown when rejectionPolicy.currMaxTime minus windowMillis exceeds the capacity of long
|
||||
minTimestampAsDate = segmentGranularity.truncate(rejectionPolicy.getCurrMaxTime());
|
||||
}
|
||||
DateTime minTimestampAsDate = new DateTime(Math.max(windowMillis, rejectionPolicy.getCurrMaxTime().getMillis()) - windowMillis);
|
||||
long minTimestamp = minTimestampAsDate.getMillis();
|
||||
|
||||
log.info("Found [%,d] sinks. minTimestamp [%s]", sinks.size(), minTimestampAsDate);
|
||||
|
|
Loading…
Reference in New Issue