use of org.apache.druid.client.ImmutableSegmentLoadInfo in project druid by druid-io.
the class DataSourcesResourceTest method testSegmentLoadChecksForAssignableServer.
@Test
public void testSegmentLoadChecksForAssignableServer() {
Interval interval = Intervals.of("2011-04-01/2011-04-02");
Assert.assertTrue(DataSourcesResource.isSegmentLoaded(Collections.singletonList(new ImmutableSegmentLoadInfo(createSegment(interval, "v1", 2), Sets.newHashSet(createHistoricalServerMetadata("a")))), new SegmentDescriptor(interval, "v1", 2)));
Assert.assertFalse(DataSourcesResource.isSegmentLoaded(Collections.singletonList(new ImmutableSegmentLoadInfo(createSegment(interval, "v1", 2), Sets.newHashSet(createRealtimeServerMetadata("a")))), new SegmentDescriptor(interval, "v1", 2)));
}
use of org.apache.druid.client.ImmutableSegmentLoadInfo in project druid by druid-io.
the class DataSourcesResourceTest method testSegmentLoadChecksForPartitionNumber.
@Test
public void testSegmentLoadChecksForPartitionNumber() {
Interval interval = Intervals.of("2011-04-01/2011-04-02");
Assert.assertTrue(DataSourcesResource.isSegmentLoaded(Collections.singletonList(new ImmutableSegmentLoadInfo(createSegment(interval, "v1", 1), Sets.newHashSet(createHistoricalServerMetadata("a")))), new SegmentDescriptor(interval, "v1", 1)));
Assert.assertFalse(DataSourcesResource.isSegmentLoaded(Collections.singletonList(new ImmutableSegmentLoadInfo(createSegment(interval, "v1", 1), Sets.newHashSet(createHistoricalServerMetadata("a")))), new SegmentDescriptor(interval, "v1", 2)));
}
Aggregations