From d0290b1975c07adeffa2501fec425ed8634af0b6 Mon Sep 17 00:00:00 2001 From: xvrl Date: Mon, 31 Dec 2012 14:52:34 -0800 Subject: [PATCH] fix flawed interval overlap rule test fails around month end --- .../main/java/com/metamx/druid/master/rules/PeriodLoadRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java b/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java index 84128e4a74d..60d27eb01cd 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java +++ b/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java @@ -83,7 +83,7 @@ public class PeriodLoadRule extends LoadRule @Override public boolean appliesTo(DataSegment segment) { - final Interval currInterval = new Interval(new DateTime().minus(period), period); + final Interval currInterval = new Interval(period, new DateTime()); return currInterval.overlaps(segment.getInterval()); } }