target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void fromString1440m() { String s = "metrics_1440m"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.MIN_1440, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void maxTimeRetryOnUnavailable_shouldRethrow() throws Exception { RetryNTimes retryPolicy = new RetryNTimes(3, 3, 3); Statement mockStatement = mock( Statement.class ); RetryPolicy.RetryDecision retryResult = retryPolicy.onUnavailable(mockStatement, ConsistencyLevel.LOCAL_ONE, 1, 0, 3); RetryPolicy.RetryDe...
@Override public RetryDecision onUnavailable(Statement stmnt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, int uTime) { if (uTime < unavailableAttempts) { LOG.info(String.format("Retrying on unavailable: stmnt %s, consistency %s, " + "requiredResponse %d, receivedResponse %d, rTime %d", stmnt, cl,...
RetryNTimes implements RetryPolicy { @Override public RetryDecision onUnavailable(Statement stmnt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, int uTime) { if (uTime < unavailableAttempts) { LOG.info(String.format("Retrying on unavailable: stmnt %s, consistency %s, " + "requiredResponse %d, recei...
RetryNTimes implements RetryPolicy { @Override public RetryDecision onUnavailable(Statement stmnt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, int uTime) { if (uTime < unavailableAttempts) { LOG.info(String.format("Retrying on unavailable: stmnt %s, consistency %s, " + "requiredResponse %d, recei...
RetryNTimes implements RetryPolicy { @Override public RetryDecision onUnavailable(Statement stmnt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, int uTime) { if (uTime < unavailableAttempts) { LOG.info(String.format("Retrying on unavailable: stmnt %s, consistency %s, " + "requiredResponse %d, recei...
RetryNTimes implements RetryPolicy { @Override public RetryDecision onUnavailable(Statement stmnt, ConsistencyLevel cl, int requiredResponses, int receivedResponses, int uTime) { if (uTime < unavailableAttempts) { LOG.info(String.format("Retrying on unavailable: stmnt %s, consistency %s, " + "requiredResponse %d, recei...
@Test public void fromStringOtherReturnsNull() { String s = "metrics_1990m"; Granularity gran = Granularity.fromString(s); Assert.assertNull(gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromStringFullShortName() { String s = "full"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.FULL, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromString5mShortName() { String s = "5m"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.MIN_5, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromString20mShortName() { String s = "20m"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.MIN_20, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromString60mShortName() { String s = "60m"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.MIN_60, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromString240mShortName() { String s = "240m"; Granularity gran = Granularity.fromString(s); Assert.assertSame(Granularity.MIN_240, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromString1440mShortName() { String s = "1440m"; Granularity gran = Granularity.fromString(s); Assert.assertNotNull(gran); Assert.assertSame(Granularity.MIN_1440, gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromStringCaseSensitive() { String s = "METRICS_1440M"; Granularity gran = Granularity.fromString(s); Assert.assertNull(gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void fromStringNullReturnsNull() { Granularity gran = Granularity.fromString(null); Assert.assertNull(gran); }
public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
Granularity { public static Granularity fromString(String s) { for (Granularity g : granularities) if (g.name().equals(s) || g.shortName().equals(s)) return g; return null; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int num...
@Test public void testBadGranularityFromPointsInterval() { try { Granularity.granularityFromPointsInInterval("TENANTID1234",fromBaseMillis+2, fromBaseMillis+1, 3); Assert.fail("Should not have worked"); } catch (RuntimeException e) { Assert.assertEquals("Invalid interval specified for fromPointsInInterval", e.getMessag...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void testCacher() throws Exception { MetricsCollection collection = createTestData(); MetadataCache rollupTypeCache = mock(MetadataCache.class); ThreadPoolExecutor tpe = new ThreadPoolBuilder().withName("rtc test").build(); RollupTypeCacher rollupTypeCacher = new RollupTypeCacher(tpe, rollupTypeCache); rol...
@Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; }
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } }
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
@Test public void coarserGranularitiesAreCoarserThanFinerOnes() { Assert.assertFalse(Granularity.FULL.isCoarser(Granularity.MIN_5)); Assert.assertFalse(Granularity.MIN_5.isCoarser(Granularity.MIN_20)); Assert.assertFalse(Granularity.MIN_20.isCoarser(Granularity.MIN_60)); Assert.assertFalse(Granularity.MIN_60.isCoarser(...
public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Gra...
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Gra...
@Test(expected = NullPointerException.class) public void isCoarserWithNullThrowsException() { Assert.assertFalse(Granularity.FULL.isCoarser(null)); }
public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Gra...
Granularity { public boolean isCoarser(Granularity other) { return indexOf(this) > indexOf(other); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Granularity finer(); boolean isCoarser(Gra...
@Test public void snapMillisOnFullReturnsSameValue() { Assert.assertEquals(1234L, Granularity.FULL.snapMillis(1234L)); Assert.assertEquals(1000L, Granularity.FULL.snapMillis(1000L)); Assert.assertEquals(0L, Granularity.FULL.snapMillis(0L)); Assert.assertEquals(1234567L, Granularity.FULL.snapMillis(1234567L)); }
public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Gran...
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Gran...
@Test public void snapMillisOnOtherReturnsSnappedValue() { Assert.assertEquals(0L, Granularity.MIN_5.snapMillis(1234L)); Assert.assertEquals(0L, Granularity.MIN_5.snapMillis(1000L)); Assert.assertEquals(0L, Granularity.MIN_5.snapMillis(0L)); Assert.assertEquals(0L, Granularity.MIN_5.snapMillis(299999L)); Assert.assertE...
public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Gran...
Granularity { public long snapMillis(long millis) { if (this == FULL) return millis; else return (millis / milliseconds) * milliseconds; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); Gran...
@Test public void millisToSlotReturnsNumberOfSlotForGivenTime() { Assert.assertEquals(0, Granularity.millisToSlot(0)); Assert.assertEquals(0, Granularity.millisToSlot(1)); Assert.assertEquals(0, Granularity.millisToSlot(299999L)); Assert.assertEquals(1, Granularity.millisToSlot(300000L)); Assert.assertEquals(1, Granula...
static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularit...
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularit...
@Test public void millisToSlotWithNegativeReturnsNegative() { Assert.assertEquals(0, Granularity.millisToSlot(-0)); Assert.assertEquals(0, Granularity.millisToSlot(-1)); Assert.assertEquals(0, Granularity.millisToSlot(-299999L)); Assert.assertEquals(-1, Granularity.millisToSlot(-300000L)); Assert.assertEquals(-1, Granu...
static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularit...
Granularity { static int millisToSlot(long millis) { return (int)((millis % (BASE_SLOTS_PER_GRANULARITY * MILLISECONDS_IN_SLOT)) / MILLISECONDS_IN_SLOT); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularit...
@Test public void slotReturnsTheSlotNumber() { Assert.assertEquals(0, Granularity.FULL.slot(1234L)); Assert.assertEquals(0, Granularity.FULL.slot(1000L)); Assert.assertEquals(0, Granularity.FULL.slot(0L)); Assert.assertEquals(0, Granularity.FULL.slot(299999L)); Assert.assertEquals(1, Granularity.FULL.slot(300000L)); As...
public int slot(long millis) { int fullSlot = millisToSlot(millis); return (numSlots * fullSlot) / BASE_SLOTS_PER_GRANULARITY; }
Granularity { public int slot(long millis) { int fullSlot = millisToSlot(millis); return (numSlots * fullSlot) / BASE_SLOTS_PER_GRANULARITY; } }
Granularity { public int slot(long millis) { int fullSlot = millisToSlot(millis); return (numSlots * fullSlot) / BASE_SLOTS_PER_GRANULARITY; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public int slot(long millis) { int fullSlot = millisToSlot(millis); return (numSlots * fullSlot) / BASE_SLOTS_PER_GRANULARITY; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); ...
Granularity { public int slot(long millis) { int fullSlot = millisToSlot(millis); return (numSlots * fullSlot) / BASE_SLOTS_PER_GRANULARITY; } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coarser(); ...
@Test public void granFromPointsLinear100PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 48000000, 100, "LINEAR", 1); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 48000001, 100, "LINEAR", 1);...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLinear1000PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 480000000L, 1000, "LINEAR", 1); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 480000001L, 1000, "LINEA...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLinear10000PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 4800000000L, 10000, "LINEAR", 1); Assert.assertNull(gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 4800000001L, 10000, "LINEAR", 1); Assert...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void testCacherDoesCacheRollupTypeForPreAggregatedMetrics() throws Exception { MetricsCollection collection = createPreaggregatedTestMetrics(); MetadataCache rollupTypeCache = mock(MetadataCache.class); ThreadPoolExecutor tpe = new ThreadPoolBuilder().withName("rtc test").build(); RollupTypeCacher rollupTy...
@Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; }
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } }
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
RollupTypeCacher extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Runnable() { @Override public void run() { recordWithTimer(input); } }); return null; } RollupTypeCacher(ThreadPoolExecutor executor, Metada...
@Test public void granFromPointsLinearBoundaryBetween20And60() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 18000000, 10, "LINEAR", 1); Assert.assertSame(Granularity.MIN_20, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 18000001, 10, "LINEAR", 1); Assert.a...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLinearBoundaryBetween60And240() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 57600000, 10, "LINEAR", 1); Assert.assertSame(Granularity.MIN_60, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 57600001, 10, "LINEAR", 1); Assert....
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLinearBoundaryBetween240And1440() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 246857142, 10, "LINEAR", 1); Assert.assertSame(Granularity.MIN_240, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 246857143, 10, "LINEAR", 1); As...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test(expected = RuntimeException.class) public void granFromPointsWithFromGreaterThanToThrowsException() { Granularity gran = Granularity.granularityFromPointsInInterval("abc123", 10, 5, 10, "LINEAR", 1); }
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test(expected = RuntimeException.class) public void granFromPointsWithFromEqualToThrowsException() { Granularity gran = Granularity.granularityFromPointsInInterval("abc123", 10, 10, 10, "LINEAR", 1); }
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLessThanEqual100PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 30000000, 100, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 30000001, 100,...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLessThanEqual1000PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 300000000L, 1000, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 300000001L...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test(expected = NullPointerException.class) public void granFromPointsLessThanEqual10000PointsBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 3000000000L, 10000, "LESSTHANEQUAL", 1); }
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLessThanEqualBoundaryBetween20And60() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 12000000, 10, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_20, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 12000001, 10, "LESSTHA...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLessThanEqualBoundaryBetween60And240() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 36000000, 10, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_60, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 36000001, 10, "LESSTH...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void test() throws Exception { MetricsCollection collection = createTestData(); IncomingMetricMetadataAnalyzer metricMetadataAnalyzer = mock(IncomingMetricMetadataAnalyzer.class); ThreadPoolExecutor tpe = new ThreadPoolBuilder().withName("rtc test").build(); TypeAndUnitProcessor typeAndUnitProcessor = new ...
@Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Callable<MetricsCollection>() { public MetricsCollection call() throws Exception { Collection<IncomingMetricException> problems = metricMetadataAnalyzer.scanMetrics(input.toMetrics()); for (IncomingMetricException p...
TypeAndUnitProcessor extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Callable<MetricsCollection>() { public MetricsCollection call() throws Exception { Collection<IncomingMetricException> problems = metric...
TypeAndUnitProcessor extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Callable<MetricsCollection>() { public MetricsCollection call() throws Exception { Collection<IncomingMetricException> problems = metric...
TypeAndUnitProcessor extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Callable<MetricsCollection>() { public MetricsCollection call() throws Exception { Collection<IncomingMetricException> problems = metric...
TypeAndUnitProcessor extends FunctionWithThreadPool<MetricsCollection, Void> { @Override public Void apply(final MetricsCollection input) throws Exception { getThreadPool().submit(new Callable<MetricsCollection>() { public MetricsCollection call() throws Exception { Collection<IncomingMetricException> problems = metric...
@Test public void granFromPointsLessThanEqualBoundaryBetween240And1440() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 144000000, 10, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_240, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 144000001, 10, "L...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsLessThanEqualWouldBeUpperBoundaryOf1440() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 864000000, 10, "LESSTHANEQUAL", 1); Assert.assertSame(Granularity.MIN_1440, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 864000001, 10, ...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsGeometricBoundaryBetween5And20() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 6000000, 10, "GEOMETRIC", 1, alwaysZeroClock); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 6000001, 10, "GE...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsGeometricBoundaryBetween20And60() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 20784609, 10, "GEOMETRIC", 1, alwaysZeroClock); Assert.assertSame(Granularity.MIN_20, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 20784610, 10,...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsGeometricBoundaryBetween60And240() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 72000000, 10, "GEOMETRIC", 1, alwaysZeroClock); Assert.assertSame(Granularity.MIN_60, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 72000001, 10...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsGeometricBoundaryBetween240And1440() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 352726522, 10, "GEOMETRIC", 1, alwaysZeroClock); Assert.assertSame(Granularity.MIN_240, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 35272652...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsGeometricWithDefaultClockAndAllGranularitiesSkippedReturnsCoarsest() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 6000000, 10, "GEOMETRIC", 1, alwaysZeroClock); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInIn...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void granFromPointsInvalidAlgorithmDefaultsToGeometric() { Granularity gran; gran = Granularity.granularityFromPointsInInterval("abc123", 0, 48000000, 100, "LINEAR", 1); Assert.assertSame(Granularity.MIN_5, gran); gran = Granularity.granularityFromPointsInInterval("abc123", 0, 48000001, 100, "LINEAR", 1); ...
public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } }
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
Granularity { public static Granularity granularityFromPointsInInterval(String tenantid, long from, long to, int points) { return granularityFromPointsInInterval(tenantid, from, to, points, GET_BY_POINTS_SELECTION_ALGORITHM, GET_BY_POINTS_ASSUME_INTERVAL, DEFAULT_TTL_COMPARISON_SOURCE); } private Granularity(String cf...
@Test public void deriveRangeFiveMinuteFirstSlot() { Granularity gran = Granularity.MIN_5; Range range; range = gran.deriveRange(0, 0); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(299999, range.getStop()); range = gran.deriveRange(0, 1); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(29...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRangeFiveMinuteSecondSlot() { Granularity gran = Granularity.MIN_5; Range range; range = gran.deriveRange(1, 0); Assert.assertEquals(-1209300000, range.getStart()); Assert.assertEquals(-1209000001, range.getStop()); range = gran.deriveRange(1, 1); Assert.assertEquals(-1209300000, range.getStart(...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void testWriter() throws Exception { Counter bufferedMetrics = mock(Counter.class); IngestionContext context = mock(IngestionContext.class); AbstractMetricsRW basicRW = mock(AbstractMetricsRW.class); AbstractMetricsRW preAggrRW = mock(AbstractMetricsRW.class); MetricsRWDelegator metricsRWDelegator = new Me...
@Override public ListenableFuture<List<Boolean>> apply(List<List<IMetric>> input) throws Exception { final long writeStartTime = System.currentTimeMillis(); final Timer.Context actualWriteCtx = writeDurationTimer.time(); final List<ListenableFuture<Boolean>> resultFutures = new ArrayList<ListenableFuture<Boolean>>(); f...
BatchWriter extends FunctionWithThreadPool<List<List<IMetric>>, ListenableFuture<List<Boolean>>> { @Override public ListenableFuture<List<Boolean>> apply(List<List<IMetric>> input) throws Exception { final long writeStartTime = System.currentTimeMillis(); final Timer.Context actualWriteCtx = writeDurationTimer.time(); ...
BatchWriter extends FunctionWithThreadPool<List<List<IMetric>>, ListenableFuture<List<Boolean>>> { @Override public ListenableFuture<List<Boolean>> apply(List<List<IMetric>> input) throws Exception { final long writeStartTime = System.currentTimeMillis(); final Timer.Context actualWriteCtx = writeDurationTimer.time(); ...
BatchWriter extends FunctionWithThreadPool<List<List<IMetric>>, ListenableFuture<List<Boolean>>> { @Override public ListenableFuture<List<Boolean>> apply(List<List<IMetric>> input) throws Exception { final long writeStartTime = System.currentTimeMillis(); final Timer.Context actualWriteCtx = writeDurationTimer.time(); ...
BatchWriter extends FunctionWithThreadPool<List<List<IMetric>>, ListenableFuture<List<Boolean>>> { @Override public ListenableFuture<List<Boolean>> apply(List<List<IMetric>> input) throws Exception { final long writeStartTime = System.currentTimeMillis(); final Timer.Context actualWriteCtx = writeDurationTimer.time(); ...
@Test public void deriveRangeFiveMinuteLastSlot() { Granularity gran = Granularity.MIN_5; Range range; range = gran.deriveRange(3, 0); Assert.assertEquals(-1208700000, range.getStart()); Assert.assertEquals(-1208400001, range.getStop()); range = gran.deriveRange(3, 1); Assert.assertEquals(-1208700000, range.getStart())...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRangeTwentyMinuteFirstSlot() { Granularity gran = Granularity.MIN_20; Range range; range = gran.deriveRange(0, 0); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(1199999, range.getStop()); range = gran.deriveRange(0, 1); Assert.assertEquals(0, range.getStart()); Assert.assertEqual...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRangeTwentyMinuteSecondSlot() { Granularity gran = Granularity.MIN_20; Range range; range = gran.deriveRange(1, 0); Assert.assertEquals(-1208400000, range.getStart()); Assert.assertEquals(-1207200001, range.getStop()); range = gran.deriveRange(1, 1); Assert.assertEquals(-1208400000, range.getSta...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRangeSixtyMinuteFirstSlot() { Granularity gran = Granularity.MIN_60; Range range; range = gran.deriveRange(0, 0); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(3599999, range.getStop()); range = gran.deriveRange(0, 1); Assert.assertEquals(0, range.getStart()); Assert.assertEquals...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRangeSixtyMinuteSecondSlot() { Granularity gran = Granularity.MIN_60; Range range; range = gran.deriveRange(1, 0); Assert.assertEquals(-1206000000, range.getStart()); Assert.assertEquals(-1202400001, range.getStop()); range = gran.deriveRange(1, 1); Assert.assertEquals(-1206000000, range.getStar...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRange240MinuteFirstSlot() { Granularity gran = Granularity.MIN_240; Range range; range = gran.deriveRange(0, 0); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(14399999, range.getStop()); range = gran.deriveRange(0, 1); Assert.assertEquals(0, range.getStart()); Assert.assertEquals...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRange240MinuteSecondSlot() { Granularity gran = Granularity.MIN_240; Range range; range = gran.deriveRange(1, 0); Assert.assertEquals(-1195200000, range.getStart()); Assert.assertEquals(-1180800001, range.getStop()); range = gran.deriveRange(1, 1); Assert.assertEquals(-1195200000, range.getStart...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRange1440MinuteFirstSlot() { Granularity gran = Granularity.MIN_1440; Range range; range = gran.deriveRange(0, 0); Assert.assertEquals(0, range.getStart()); Assert.assertEquals(86399999, range.getStop()); range = gran.deriveRange(0, 1); Assert.assertEquals(0, range.getStart()); Assert.assertEqua...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void deriveRange1440MinuteSecondSlot() { Granularity gran = Granularity.MIN_1440; Range range; range = gran.deriveRange(1, 0); Assert.assertEquals(-1123200000, range.getStart()); Assert.assertEquals(-1036800001, range.getStop()); range = gran.deriveRange(1, 1); Assert.assertEquals(-1123200000, range.getSta...
public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(rangeStart, ran...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
Granularity { public Range deriveRange(int slot, long referenceMillis) { referenceMillis = snapMillis(referenceMillis); int refSlot = slot(referenceMillis); int slotDiff = slot > refSlot ? (numSlots() - slot + refSlot) : (refSlot - slot); long rangeStart = referenceMillis - slotDiff * milliseconds(); return new Range(r...
@Test public void slotFromFiner() throws GranularityException { Assert.assertEquals(0, Granularity.MIN_5.slotFromFinerSlot(0)); Assert.assertEquals(1, Granularity.MIN_5.slotFromFinerSlot(1)); Assert.assertEquals(4031, Granularity.MIN_5.slotFromFinerSlot(4031)); Assert.assertEquals(4032, Granularity.MIN_5.slotFromFinerS...
public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
@Test public void pollSchedulesEligibleSlots() { service.poll(); verify(context).scheduleEligibleSlots(anyLong(), anyLong(), anyLong()); verifyNoMoreInteractions(context); verifyZeroInteractions(shardStateManager); verifyZeroInteractions(locatorFetchExecutors); verifyZeroInteractions(rollupReadExecutors); verifyZeroInt...
final void poll() { Timer.Context timer = polltimer.time(); context.scheduleEligibleSlots(rollupDelayMillis, rollupDelayForMetricsWithShortDelay, rollupWaitForMetricsWithLongDelay); timer.stop(); }
RollupService implements Runnable, RollupServiceMBean { final void poll() { Timer.Context timer = polltimer.time(); context.scheduleEligibleSlots(rollupDelayMillis, rollupDelayForMetricsWithShortDelay, rollupWaitForMetricsWithLongDelay); timer.stop(); } }
RollupService implements Runnable, RollupServiceMBean { final void poll() { Timer.Context timer = polltimer.time(); context.scheduleEligibleSlots(rollupDelayMillis, rollupDelayForMetricsWithShortDelay, rollupWaitForMetricsWithLongDelay); timer.stop(); } RollupService(ScheduleContext context); @VisibleForTesting Rollup...
RollupService implements Runnable, RollupServiceMBean { final void poll() { Timer.Context timer = polltimer.time(); context.scheduleEligibleSlots(rollupDelayMillis, rollupDelayForMetricsWithShortDelay, rollupWaitForMetricsWithLongDelay); timer.stop(); } RollupService(ScheduleContext context); @VisibleForTesting Rollup...
RollupService implements Runnable, RollupServiceMBean { final void poll() { Timer.Context timer = polltimer.time(); context.scheduleEligibleSlots(rollupDelayMillis, rollupDelayForMetricsWithShortDelay, rollupWaitForMetricsWithLongDelay); timer.stop(); } RollupService(ScheduleContext context); @VisibleForTesting Rollup...
@Test(expected = GranularityException.class) public void slotFromFinerWithFullThrowsException() throws GranularityException { Granularity.FULL.slotFromFinerSlot(0); }
public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
@Test public void slotFromFinerDoesNotWrap() throws GranularityException { Assert.assertEquals(4031, Granularity.MIN_20.slotFromFinerSlot(16124)); Assert.assertEquals(4031, Granularity.MIN_20.slotFromFinerSlot(16125)); Assert.assertEquals(4031, Granularity.MIN_20.slotFromFinerSlot(16126)); Assert.assertEquals(4031, Gra...
public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); }
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
Granularity { public int slotFromFinerSlot(int finerSlot) throws GranularityException { return (finerSlot * numSlots()) / this.finer().numSlots(); } private Granularity(String cf, int milliseconds, int numSlots, String shortName); String name(); String shortName(); int milliseconds(); int numSlots(); Granularity coars...
@Test public void testExtrapolate() { int shard = 1; assertEquals("Invalid extrapolation - scenario 0", SlotKey.of(Granularity.MIN_5, 1, shard), SlotKey.of(Granularity.FULL, 1, shard).extrapolate(Granularity.MIN_5)); assertEquals("Invalid extrapolation - scenario 1", SlotKey.of(Granularity.MIN_5, 43, shard), SlotKey.of...
public SlotKey extrapolate(Granularity destGranularity) { if (destGranularity.equals(this.getGranularity())) { return this; } if (!destGranularity.isCoarser(getGranularity())) { throw new IllegalArgumentException("Destination granularity must be coarser than the current granularity"); } int factor = getGranularity().nu...
SlotKey { public SlotKey extrapolate(Granularity destGranularity) { if (destGranularity.equals(this.getGranularity())) { return this; } if (!destGranularity.isCoarser(getGranularity())) { throw new IllegalArgumentException("Destination granularity must be coarser than the current granularity"); } int factor = getGranul...
SlotKey { public SlotKey extrapolate(Granularity destGranularity) { if (destGranularity.equals(this.getGranularity())) { return this; } if (!destGranularity.isCoarser(getGranularity())) { throw new IllegalArgumentException("Destination granularity must be coarser than the current granularity"); } int factor = getGranul...
SlotKey { public SlotKey extrapolate(Granularity destGranularity) { if (destGranularity.equals(this.getGranularity())) { return this; } if (!destGranularity.isCoarser(getGranularity())) { throw new IllegalArgumentException("Destination granularity must be coarser than the current granularity"); } int factor = getGranul...
SlotKey { public SlotKey extrapolate(Granularity destGranularity) { if (destGranularity.equals(this.getGranularity())) { return this; } if (!destGranularity.isCoarser(getGranularity())) { throw new IllegalArgumentException("Destination granularity must be coarser than the current granularity"); } int factor = getGranul...
@Test public void singleClassYieldsThatClass() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.utils.DummyDiscoveryIO3"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNotNull(loadedModule); Assert.ass...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void singleClassInDifferentPackageYieldsThatClass() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNotNull(loadedModul...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void emptyStringYieldsNull() { Configuration.getInstance().setProperty(CoreConfig.DISCOVERY_MODULES, ""); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNull(loadedModule); }
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test(expected=RuntimeException.class) public void multipleClassesCauseAnException() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO,com.rackspacecloud.blueflood.io.DummyDiscoveryIO2"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO....
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void nonExistentClassYieldsNull() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.NonExistentClass"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNull(loadedModule); }
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void callingTwiceYieldsTheSameObjectBothTimes() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO"); Object loadedModule1 = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNotNull(loadedModule1)...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void givingDifferentKeysButSameClassYieldsTwoSeparateObjects() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO"); Object loadedModule1 = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNotNull...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void setServerTimeSetsContextTime() { service.setServerTime(1234L); verify(context).setCurrentTimeMillis(anyLong()); verifyNoMoreInteractions(context); verifyZeroInteractions(shardStateManager); verifyZeroInteractions(locatorFetchExecutors); verifyZeroInteractions(rollupReadExecutors); verifyZeroInteractio...
public synchronized void setServerTime(long millis) { log.info("Manually setting server time to {} {}", millis, new java.util.Date(millis)); context.setCurrentTimeMillis(millis); }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setServerTime(long millis) { log.info("Manually setting server time to {} {}", millis, new java.util.Date(millis)); context.setCurrentTimeMillis(millis); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setServerTime(long millis) { log.info("Manually setting server time to {} {}", millis, new java.util.Date(millis)); context.setCurrentTimeMillis(millis); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleC...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setServerTime(long millis) { log.info("Manually setting server time to {} {}", millis, new java.util.Date(millis)); context.setCurrentTimeMillis(millis); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleC...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setServerTime(long millis) { log.info("Manually setting server time to {} {}", millis, new java.util.Date(millis)); context.setCurrentTimeMillis(millis); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleC...
@Test public void testSlotFromSlotKey() { int expectedSlot = 1; int slot = SlotKeySerDes.slotFromSlotKey(SlotKey.of(Granularity.MIN_5, expectedSlot, 10).toString()); Assert.assertEquals(expectedSlot, slot); }
protected static int slotFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[1]); }
SlotKeySerDes { protected static int slotFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[1]); } }
SlotKeySerDes { protected static int slotFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[1]); } }
SlotKeySerDes { protected static int slotFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[1]); } static SlotKey deserialize(String stateStr); String serialize(SlotKey slotKey); String serialize(Granularity gran, int slot, int shard); }
SlotKeySerDes { protected static int slotFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[1]); } static SlotKey deserialize(String stateStr); String serialize(SlotKey slotKey); String serialize(Granularity gran, int slot, int shard); }
@Test public void callingTwiceWithSameKeyButDifferentClassesYieldsTheSameObjectBothTimes() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO"); Object loadedModule1 = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Asser...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void specifyingAnInterfaceYieldsNull() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DiscoveryIO"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNull(loadedModule); }
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void classWithNoParameterlessConstructorYieldsNull() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO4"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNull(loadedModule...
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void packagePrivateClassYieldsNull() { Configuration.getInstance().setProperty( CoreConfig.DISCOVERY_MODULES, "com.rackspacecloud.blueflood.io.DummyDiscoveryIO5"); Object loadedModule = ModuleLoader.getInstance(DiscoveryIO.class, CoreConfig.DISCOVERY_MODULES); Assert.assertNull(loadedModule); }
public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null; if (modules.s...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
ModuleLoader { public static Object getInstance(Class c, CoreConfig moduleName) { Object moduleInstance = loadedModules.get(moduleName.name().toString()); if (moduleInstance != null) return moduleInstance; List<String> modules = Configuration.getInstance().getListProperty(moduleName); if (modules.isEmpty()) return null...
@Test public void testGlobMatchingAnyChar() { String glob = "*"; String expectedRegex = ".*"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testEmptyGlob() { String glob = ""; String expectedRegex = ""; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testGlobWithWildcards1() { String glob = "foo.bar$1.(cat).baz|qux.dog+"; String expectedRegex = "foo\\.bar\\$1\\.\\(cat\\)\\.baz\\|qux\\.dog\\+"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameGlob() { String glob = "foo.bar.*"; String expectedRegex = "foo\\.bar\\..*"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameGlobWithWildCards() { String glob = "f*.bar.*"; String expectedRegex = "f.*\\.bar\\..*"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameWithMatchingSingleChar() { String glob = "foo?"; String expectedRegex = "foo."; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void getServerTimeGetsContextTime() { long expected = 1234L; doReturn(expected).when(context).getCurrentTimeMillis(); long actual = service.getServerTime(); assertEquals(expected, actual); verify(context).getCurrentTimeMillis(); verifyNoMoreInteractions(context); verifyZeroInteractions(shardStateManager); ...
public synchronized long getServerTime() { return context.getCurrentTimeMillis(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized long getServerTime() { return context.getCurrentTimeMillis(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized long getServerTime() { return context.getCurrentTimeMillis(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized long getServerTime() { return context.getCurrentTimeMillis(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized long getServerTime() { return context.getCurrentTimeMillis(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void testMetricNameWithMatchingAnyChar() { String glob = "foo*"; String expectedRegex = "foo.*"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameWithGlobSyntax() { String glob = "foo.{*}"; String expectedRegex = "foo\\.(.*)"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testVariousGlobSyntax2() { String glob = "[!abc]oo.*]"; String expectedRegex = "[^abc]oo\\..*]"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameWithVariousGlobSyntax() { String glob = "foo.[bz]*.*"; String expectedRegex = "foo\\.[bz].*\\..*"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testMetricNameGlobWithoutWildCard() { String glob = "foo.bar"; String expectedRegex = "foo\\.bar"; GlobPattern pattern = new GlobPattern(glob); Assert.assertEquals(expectedRegex, pattern.compiled().toString()); }
public Pattern compiled() { return compiled; }
GlobPattern { public Pattern compiled() { return compiled; } }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
GlobPattern { public Pattern compiled() { return compiled; } GlobPattern(String globPattern); Pattern compiled(); static Pattern compile(String globPattern); boolean matches(CharSequence s); void set(String glob); boolean hasWildcard(); }
@Test public void testAlwaysPresent() { Assert.assertTrue(ttlProvider.getTTL("test", Granularity.FULL, RollupType.NOT_A_ROLLUP).isPresent()); }
@Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { return getSafeTTL(gran, rollupType); }
SafetyTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { return getSafeTTL(gran, rollupType); } }
SafetyTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { return getSafeTTL(gran, rollupType); } SafetyTtlProvider(); }
SafetyTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { return getSafeTTL(gran, rollupType); } SafetyTtlProvider(); @Override Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType); Optional<Ti...
SafetyTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { return getSafeTTL(gran, rollupType); } SafetyTtlProvider(); @Override Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType); Optional<Ti...
@Test public void testSetLocatorCurrentInBatchLayer() throws InterruptedException { locatorCache.setLocatorCurrentInBatchLayer(LOCATOR); assertTrue("locator not stored in cache", locatorCache.isLocatorCurrentInBatchLayer(LOCATOR)); Thread.sleep(2000L); assertTrue("locator not expired from cache", !locatorCache.isLocato...
public synchronized void setLocatorCurrentInBatchLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setBatchCurrent(); }
LocatorCache { public synchronized void setLocatorCurrentInBatchLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setBatchCurrent(); } }
LocatorCache { public synchronized void setLocatorCurrentInBatchLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfterWriteTi...
LocatorCache { public synchronized void setLocatorCurrentInBatchLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfterWriteTi...
LocatorCache { public synchronized void setLocatorCurrentInBatchLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfterWriteTi...
@Test public void testIsLocatorCurrentInBatchLayer() throws InterruptedException { assertTrue("locator which was never set is present in cache", !locatorCache.isLocatorCurrentInBatchLayer(LOCATOR)); locatorCache.setLocatorCurrentInBatchLayer(LOCATOR); assertTrue("locator not stored in cache", locatorCache.isLocatorCurr...
public synchronized boolean isLocatorCurrentInBatchLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isBatchCurrent(); }
LocatorCache { public synchronized boolean isLocatorCurrentInBatchLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isBatchCurrent(); } }
LocatorCache { public synchronized boolean isLocatorCurrentInBatchLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
LocatorCache { public synchronized boolean isLocatorCurrentInBatchLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
LocatorCache { public synchronized boolean isLocatorCurrentInBatchLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isBatchCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
@Test public void testSetLocatorCurrentInDiscoveryLayer() throws InterruptedException { locatorCache.setLocatorCurrentInDiscoveryLayer(LOCATOR); assertTrue("locator not stored in cache", locatorCache.isLocatorCurrentInDiscoveryLayer(LOCATOR)); Thread.sleep(2000L); assertTrue("locator not expired from cache", !locatorCa...
public synchronized void setLocatorCurrentInDiscoveryLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setDiscoveryCurrent(); }
LocatorCache { public synchronized void setLocatorCurrentInDiscoveryLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setDiscoveryCurrent(); } }
LocatorCache { public synchronized void setLocatorCurrentInDiscoveryLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfte...
LocatorCache { public synchronized void setLocatorCurrentInDiscoveryLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfte...
LocatorCache { public synchronized void setLocatorCurrentInDiscoveryLayer(Locator loc) { getOrCreateInsertedLocatorEntry(loc).setDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, long expireAfterWriteDuration, TimeUnit expireAfte...
@Test public void testIsLocatorCurrentInDiscoveryLayer() throws InterruptedException { assertTrue("locator which was never set is present in cache", !locatorCache.isLocatorCurrentInDiscoveryLayer(LOCATOR)); locatorCache.setLocatorCurrentInDiscoveryLayer(LOCATOR); assertTrue("locator not stored in cache", locatorCache.i...
public synchronized boolean isLocatorCurrentInDiscoveryLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isDiscoveryCurrent(); }
LocatorCache { public synchronized boolean isLocatorCurrentInDiscoveryLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isDiscoveryCurrent(); } }
LocatorCache { public synchronized boolean isLocatorCurrentInDiscoveryLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
LocatorCache { public synchronized boolean isLocatorCurrentInDiscoveryLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
LocatorCache { public synchronized boolean isLocatorCurrentInDiscoveryLayer(Locator loc) { LocatorCacheEntry entry = insertedLocators.getIfPresent(loc.toString()); return entry != null && entry.isDiscoveryCurrent(); } protected LocatorCache(long expireAfterAccessDuration, TimeUnit expireAfterAccessTimeUnit, ...
@Test public void getKeepingServerTimeGetsKeepingServerTime() { assertEquals(true, service.getKeepingServerTime()); }
public synchronized boolean getKeepingServerTime() { return keepingServerTime; }
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getKeepingServerTime() { return keepingServerTime; } }
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getKeepingServerTime() { return keepingServerTime; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getKeepingServerTime() { return keepingServerTime; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getKeepingServerTime() { return keepingServerTime; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void testConfigTtl_invalid() { Assert.assertFalse(ttlProvider.getTTL("acBar", Granularity.FULL, RollupType.SET).isPresent()); }
@Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting to safe TTL values.", gran.name(), rollupType.nam...
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting ...
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting ...
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting ...
ConfigTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { final TimeValue ttl = ttlMapper.get(gran, rollupType); if (ttl == null) { log.trace("No valid TTL entry for granularity: {}, rollup type: {}" + " in config. Resorting ...
@Test public void testGetTTL() throws Exception { assertTrue(combinedProvider.getTTL("foo", Granularity.FULL, RollupType.BF_BASIC).isPresent()); assertTrue(combinedProvider.getTTL("foo", Granularity.MIN_5, RollupType.BF_BASIC).isPresent()); assertFalse(configProvider.getTTL("foo", Granularity.MIN_5, RollupType.BF_BASIC...
@Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { Optional<TimeValue> primaryValue = primary.getTTL(tenantId, gran, rollupType); Optional<TimeValue> safetyValue = safety.getTTL(tenantId, gran, rollupType); return getTimeValue(primaryValue, safetyValue); }
CombinedTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { Optional<TimeValue> primaryValue = primary.getTTL(tenantId, gran, rollupType); Optional<TimeValue> safetyValue = safety.getTTL(tenantId, gran, rollupType); return ge...
CombinedTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { Optional<TimeValue> primaryValue = primary.getTTL(tenantId, gran, rollupType); Optional<TimeValue> safetyValue = safety.getTTL(tenantId, gran, rollupType); return ge...
CombinedTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { Optional<TimeValue> primaryValue = primary.getTTL(tenantId, gran, rollupType); Optional<TimeValue> safetyValue = safety.getTTL(tenantId, gran, rollupType); return ge...
CombinedTtlProvider implements TenantTtlProvider { @Override public Optional<TimeValue> getTTL(String tenantId, Granularity gran, RollupType rollupType) { Optional<TimeValue> primaryValue = primary.getTTL(tenantId, gran, rollupType); Optional<TimeValue> safetyValue = safety.getTTL(tenantId, gran, rollupType); return ge...
@Test public void testTTL() { Locator locator = Locator.createLocatorFromPathComponents("tenantId", "metricName"); Metric metric = new Metric(locator, 134891734L, System.currentTimeMillis(), new TimeValue(5, TimeUnit.HOURS), "Unknown"); try { metric.setTtl(new TimeValue(Long.MAX_VALUE, TimeUnit.SECONDS)); fail(); } cat...
public void setTtl(TimeValue ttl) { if (!isValidTTL(ttl.toSeconds())) { throw new InvalidDataException("TTL supplied for metric is invalid. Required: 0 < ttl < " + Integer.MAX_VALUE + ", provided: " + ttl.toSeconds()); } ttlInSeconds = (int) ttl.toSeconds(); }
Metric implements IMetric { public void setTtl(TimeValue ttl) { if (!isValidTTL(ttl.toSeconds())) { throw new InvalidDataException("TTL supplied for metric is invalid. Required: 0 < ttl < " + Integer.MAX_VALUE + ", provided: " + ttl.toSeconds()); } ttlInSeconds = (int) ttl.toSeconds(); } }
Metric implements IMetric { public void setTtl(TimeValue ttl) { if (!isValidTTL(ttl.toSeconds())) { throw new InvalidDataException("TTL supplied for metric is invalid. Required: 0 < ttl < " + Integer.MAX_VALUE + ", provided: " + ttl.toSeconds()); } ttlInSeconds = (int) ttl.toSeconds(); } Metric(Locator locator, Object ...
Metric implements IMetric { public void setTtl(TimeValue ttl) { if (!isValidTTL(ttl.toSeconds())) { throw new InvalidDataException("TTL supplied for metric is invalid. Required: 0 < ttl < " + Integer.MAX_VALUE + ", provided: " + ttl.toSeconds()); } ttlInSeconds = (int) ttl.toSeconds(); } Metric(Locator locator, Object ...
Metric implements IMetric { public void setTtl(TimeValue ttl) { if (!isValidTTL(ttl.toSeconds())) { throw new InvalidDataException("TTL supplied for metric is invalid. Required: 0 < ttl < " + Integer.MAX_VALUE + ", provided: " + ttl.toSeconds()); } ttlInSeconds = (int) ttl.toSeconds(); } Metric(Locator locator, Object ...
@Test public void publicConstructorDoesNotSetStringRepresentation() { Locator locator = new Locator(); assertNotNull(locator); assertNull(locator.toString()); }
public String toString() { return stringRep; }
Locator implements Comparable<Locator> { public String toString() { return stringRep; } }
Locator implements Comparable<Locator> { public String toString() { return stringRep; } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { public String toString() { return stringRep; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other); static Loc...
Locator implements Comparable<Locator> { public String toString() { return stringRep; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other); static Loc...
@Test public void publicConstructorDoesNotSetTenant() { Locator locator = new Locator(); assertNotNull(locator); assertNull(locator.getTenantId()); }
public String getTenantId() { return this.tenantId; }
Locator implements Comparable<Locator> { public String getTenantId() { return this.tenantId; } }
Locator implements Comparable<Locator> { public String getTenantId() { return this.tenantId; } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { public String getTenantId() { return this.tenantId; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other); sta...
Locator implements Comparable<Locator> { public String getTenantId() { return this.tenantId; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other); sta...
@Test public void publicConstructorDoesNotSetMetricName() { Locator locator = new Locator(); assertNotNull(locator); assertNull(locator.getMetricName()); }
public String getMetricName() { return this.metricName; }
Locator implements Comparable<Locator> { public String getMetricName() { return this.metricName; } }
Locator implements Comparable<Locator> { public String getMetricName() { return this.metricName; } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { public String getMetricName() { return this.metricName; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other);...
Locator implements Comparable<Locator> { public String getMetricName() { return this.metricName; } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName(); boolean equals(Locator other);...
@Test(expected = NullPointerException.class) public void isValidDBKeyThrowsExceptionOnNullDbKey() { Locator locator = new Locator(); locator.isValidDBKey(null, "a"); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test(expected = NullPointerException.class) public void isValidDBKeyThrowsExceptionOnNullDelim() { Locator locator = new Locator(); locator.isValidDBKey("a.b.c", null); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void isValidDBKeyUndelimitedStringReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.isValidDBKey("abc", ".")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...