@Test public void testMultipleTimeSeriesResponse() { setUp(); final String testMetricName1 = "testMetric1"; final List<String> testTags1 = Arrays.asList("host=h1", "dc=dc1"); final List<String> testTags2 = Arrays.asList("host=h2", "dc=dc1"); assertTrue(chunk.query(new Query("test", Collections.emptyList())).isEmpty()); parseAndAddOpenTSDBMetric( makeMetricString(testMetricName1, "host=h1 dc=dc1", testTs, testValue), chunk); parseAndAddOpenTSDBMetric( makeMetricString(testMetricName1, "host=h2 dc=dc1", testTs, testValue), chunk); Point p1 = new Point(testTs, testValue); Assert.assertThat(chunk.query(Query.parse(testMetricName1 + " dc=dc1")), IsIterableContainingInOrder.contains( new TimeSeries(testMetricName1 + " dc=dc1 host=h1", Collections.singletonList(p1)), new TimeSeries(testMetricName1 + " dc=dc1 host=h2", Collections.singletonList(p1)))); }
@Override public List<TimeSeries> query(Query query) { return store.getSeries(query); }
ChunkImpl implements Chunk { @Override public List<TimeSeries> query(Query query) { return store.getSeries(query); } }
ChunkImpl implements Chunk { @Override public List<TimeSeries> query(Query query) { return store.getSeries(query); } ChunkImpl(MetricAndTagStore store, ChunkInfo chunkInfo); }
ChunkImpl implements Chunk { @Override public List<TimeSeries> query(Query query) { return store.getSeries(query); } ChunkImpl(MetricAndTagStore store, ChunkInfo chunkInfo); @Override List<TimeSeries> query(Query query); @Override void addPoint(Metric metric, long ts, double value); @Override ChunkInfo info(); @Override boolean isReadOnly(); @Override boolean containsDataInTimeRange(long startTs, long endTs); @Override Map<String, Object> getStats(); @Override void close(); @Override void setReadOnly(boolean readOnly); MetricAndTagStore getStore(); @Override String toString(); }
ChunkImpl implements Chunk { @Override public List<TimeSeries> query(Query query) { return store.getSeries(query); } ChunkImpl(MetricAndTagStore store, ChunkInfo chunkInfo); @Override List<TimeSeries> query(Query query); @Override void addPoint(Metric metric, long ts, double value); @Override ChunkInfo info(); @Override boolean isReadOnly(); @Override boolean containsDataInTimeRange(long startTs, long endTs); @Override Map<String, Object> getStats(); @Override void close(); @Override void setReadOnly(boolean readOnly); MetricAndTagStore getStore(); @Override String toString();  }