Search in sources :

Example 1 with InventoryView

use of org.apache.druid.client.InventoryView in project druid by druid-io.

the class IntervalsResourceTest method setUp.

@Before
public void setUp() {
    inventoryView = EasyMock.createStrictMock(InventoryView.class);
    server = EasyMock.createStrictMock(DruidServer.class);
    request = EasyMock.createStrictMock(HttpServletRequest.class);
    dataSegmentList = new ArrayList<>();
    dataSegmentList.add(new DataSegment("datasource1", Intervals.of("2010-01-01T00:00:00.000Z/P1D"), "", null, null, null, null, 0x9, 20));
    dataSegmentList.add(new DataSegment("datasource1", Intervals.of("2010-01-22T00:00:00.000Z/P1D"), "", null, null, null, null, 0x9, 10));
    dataSegmentList.add(new DataSegment("datasource2", Intervals.of("2010-01-01T00:00:00.000Z/P1D"), "", null, null, null, null, 0x9, 5));
    server = new DruidServer("who", "host", null, 1234, ServerType.HISTORICAL, "tier1", 0);
    server.addDataSegment(dataSegmentList.get(0));
    server.addDataSegment(dataSegmentList.get(1));
    server.addDataSegment(dataSegmentList.get(2));
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) InventoryView(org.apache.druid.client.InventoryView) DruidServer(org.apache.druid.client.DruidServer) DataSegment(org.apache.druid.timeline.DataSegment) Before(org.junit.Before)

Aggregations

HttpServletRequest (javax.servlet.http.HttpServletRequest)1 DruidServer (org.apache.druid.client.DruidServer)1 InventoryView (org.apache.druid.client.InventoryView)1 DataSegment (org.apache.druid.timeline.DataSegment)1 Before (org.junit.Before)1