private DataSegment makeSegment(int offset) { return DataSegment.builder() .dataSource("foo") .interval( new Interval( DateTimes.of("2013-01-01").plusDays(offset), DateTimes.of("2013-01-02").plusDays(offset) ) ) .version(DateTimes.nowUtc().toString()) .dimensions(ImmutableList.of("dim1", "dim2")) .metrics(ImmutableList.of("met1", "met2")) .loadSpec(ImmutableMap.of("type", "local")) .build(); }
private DataSegment dataSegmentWithInterval(String intervalStr) { return DataSegment.builder() .dataSource("test_load_queue_peon") .interval(Intervals.of(intervalStr)) .loadSpec(ImmutableMap.of()) .version("2015-05-27T03:38:35.683Z") .dimensions(ImmutableList.of()) .metrics(ImmutableList.of()) .shardSpec(NoneShardSpec.instance()) .binaryVersion(9) .size(1200) .build(); }
private DataSegment dataSegmentWithIntervalAndVersion(String intervalStr, String version) { return DataSegment.builder() .dataSource("test_broker_server_view") .interval(Intervals.of(intervalStr)) .loadSpec( ImmutableMap.of( "type", "local", "path", "somewhere" ) ) .version(version) .dimensions(ImmutableList.of()) .metrics(ImmutableList.of()) .shardSpec(NoneShardSpec.instance()) .binaryVersion(9) .size(0) .build(); }
public DataSegment withLoadSpec(Map<String, Object> loadSpec) { return builder(this).loadSpec(loadSpec).build(); }
private DataSegment dataSegmentWithIntervalAndVersion(String intervalStr, String version) { return DataSegment.builder() .dataSource("test_curator_druid_coordinator") .interval(Intervals.of(intervalStr)) .loadSpec( ImmutableMap.of( "type", "local", "path", "somewhere" ) ) .version(version) .dimensions(ImmutableList.of()) .metrics(ImmutableList.of()) .shardSpec(NoneShardSpec.instance()) .binaryVersion(9) .size(0) .build(); } }
private DataSegment dataSegmentWithInterval(String intervalStr) { return DataSegment.builder() .dataSource("test_segment_loader") .interval(Intervals.of(intervalStr)) .loadSpec( ImmutableMap.of( "type", "local", "path", "somewhere" ) ) .version("2015-05-27T03:38:35.683Z") .dimensions(ImmutableList.of()) .metrics(ImmutableList.of()) .shardSpec(NoneShardSpec.instance()) .binaryVersion(9) .size(10L) .build(); } }
private DataSegment dataSegmentWithIntervalAndVersion(String intervalStr, String version) { return DataSegment.builder() .dataSource("test_overlord_server_view") .interval(Intervals.of(intervalStr)) .loadSpec( ImmutableMap.of( "type", "local", "path", "somewhere" ) ) .version(version) .dimensions(ImmutableList.of()) .metrics(ImmutableList.of()) .shardSpec(NoneShardSpec.instance()) .binaryVersion(9) .size(0) .build(); }
public DataSegment withLoadSpec(Map<String, Object> loadSpec) { return builder(this).loadSpec(loadSpec).build(); }