public class IndexerSQLMetadataStorageCoordinator extends Object implements IndexerMetadataStorageCoordinator
| Constructor and Description |
|---|
IndexerSQLMetadataStorageCoordinator(com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
MetadataStorageTablesConfig dbTables,
SQLMetadataConnector connector) |
| Modifier and Type | Method and Description |
|---|---|
Set<io.druid.timeline.DataSegment> |
announceHistoricalSegments(Set<io.druid.timeline.DataSegment> segments)
Attempts to insert a set of segments to the database.
|
void |
deleteSegments(Set<io.druid.timeline.DataSegment> segments) |
List<io.druid.timeline.DataSegment> |
getUnusedSegmentsForInterval(String dataSource,
org.joda.time.Interval interval)
Get all segments which include ONLY data within the given interval and are not flagged as used.
|
List<io.druid.timeline.DataSegment> |
getUsedSegmentsForInterval(String dataSource,
org.joda.time.Interval interval)
Get all segments which may include any data in the interval and are flagged as used.
|
void |
updateSegmentMetadata(Set<io.druid.timeline.DataSegment> segments) |
@Inject
public IndexerSQLMetadataStorageCoordinator(com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
MetadataStorageTablesConfig dbTables,
SQLMetadataConnector connector)
public List<io.druid.timeline.DataSegment> getUsedSegmentsForInterval(String dataSource, org.joda.time.Interval interval) throws IOException
IndexerMetadataStorageCoordinatorgetUsedSegmentsForInterval in interface IndexerMetadataStorageCoordinatordataSource - The datasource to queryinterval - The interval for which all applicable and used datasources are requested. Start is inclusive, end is exclusiveIOExceptionpublic Set<io.druid.timeline.DataSegment> announceHistoricalSegments(Set<io.druid.timeline.DataSegment> segments) throws IOException
announceHistoricalSegments in interface IndexerMetadataStorageCoordinatorsegments - set of segments to addIOExceptionpublic void updateSegmentMetadata(Set<io.druid.timeline.DataSegment> segments) throws IOException
updateSegmentMetadata in interface IndexerMetadataStorageCoordinatorIOExceptionpublic void deleteSegments(Set<io.druid.timeline.DataSegment> segments) throws IOException
deleteSegments in interface IndexerMetadataStorageCoordinatorIOExceptionpublic List<io.druid.timeline.DataSegment> getUnusedSegmentsForInterval(String dataSource, org.joda.time.Interval interval)
IndexerMetadataStorageCoordinatorgetUnusedSegmentsForInterval in interface IndexerMetadataStorageCoordinatordataSource - The datasource the segments belong tointerval - Filter the data segments to ones that include data in this interval exclusively. Start is inclusive, end is exclusiveCopyright © 2011–2015. All rights reserved.