未验证 提交 3c32ad10 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Revert "Make the duration error message more specific (#5755)" (#5758)

上级 7881ba32
......@@ -30,8 +30,6 @@ import org.joda.time.format.DateTimeFormatter;
public enum DurationUtils {
INSTANCE;
private static final int MAX_TIME_SPAN = 500;
private static final DateTimeFormatter YYYY_MM_DD = DateTimeFormat.forPattern("yyyy-MM-dd");
private static final DateTimeFormatter YYYY_MM_DD_HH = DateTimeFormat.forPattern("yyyy-MM-dd HH");
private static final DateTimeFormatter YYYY_MM_DD_HHMM = DateTimeFormat.forPattern("yyyy-MM-dd HHmm");
......@@ -121,11 +119,9 @@ public enum DurationUtils {
break;
}
i++;
if (i > MAX_TIME_SPAN) {
if (i > 500) {
throw new UnexpectedException(
"Duration data error, the span between the start time and the end time is too large, step: "
+ step.name() + ", start: " + startTimeBucket + ", end: " + endTimeBucket
+ ", max time span: " + MAX_TIME_SPAN);
"Duration data error, step: " + step.name() + ", start: " + startTimeBucket + ", end: " + endTimeBucket);
}
}
while (endTimeBucket != durations.get(durations.size() - 1).getPoint());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册