mirror of https://github.com/apache/druid.git
handle arithmeticEx
This commit is contained in:
parent
4e3f4fbc22
commit
c48c4ac0f6
|
@ -72,10 +72,8 @@ import java.util.concurrent.ScheduledExecutorService;
|
||||||
public class RealtimePlumber implements Plumber
|
public class RealtimePlumber implements Plumber
|
||||||
{
|
{
|
||||||
private static final EmittingLogger log = new EmittingLogger(RealtimePlumber.class);
|
private static final EmittingLogger log = new EmittingLogger(RealtimePlumber.class);
|
||||||
|
|
||||||
private final DataSchema schema;
|
private final DataSchema schema;
|
||||||
private final RealtimeTuningConfig config;
|
private final RealtimeTuningConfig config;
|
||||||
|
|
||||||
private final RejectionPolicy rejectionPolicy;
|
private final RejectionPolicy rejectionPolicy;
|
||||||
private final FireDepartmentMetrics metrics;
|
private final FireDepartmentMetrics metrics;
|
||||||
private final ServiceEmitter emitter;
|
private final ServiceEmitter emitter;
|
||||||
|
@ -610,10 +608,14 @@ 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;
|
||||||
DateTime minTimestampAsDate = segmentGranularity.truncate(
|
try {
|
||||||
rejectionPolicy.getCurrMaxTime().minus(windowMillis)
|
minTimestampAsDate = segmentGranularity.truncate(rejectionPolicy.getCurrMaxTime().minus(windowMillis));
|
||||||
);
|
}
|
||||||
|
catch (ArithmeticException e) {
|
||||||
|
//caused when rejectionPolicy.currMaxTime minus windowMillis exceeds the capacity of long
|
||||||
|
minTimestampAsDate = segmentGranularity.truncate(rejectionPolicy.getCurrMaxTime());
|
||||||
|
}
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue