提交 8c9d6399 编写于 作者: N nishantmonu51

review comment - better way to handle it

上级 87b83e7b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册