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
IndexerMetadataStorageCoordinator
getUsedSegmentsForInterval
in interface IndexerMetadataStorageCoordinator
dataSource
- The datasource to queryinterval
- The interval for which all applicable and used datasources are requested. Start is inclusive, end is exclusiveIOException
public Set<io.druid.timeline.DataSegment> announceHistoricalSegments(Set<io.druid.timeline.DataSegment> segments) throws IOException
announceHistoricalSegments
in interface IndexerMetadataStorageCoordinator
segments
- set of segments to addIOException
public void updateSegmentMetadata(Set<io.druid.timeline.DataSegment> segments) throws IOException
updateSegmentMetadata
in interface IndexerMetadataStorageCoordinator
IOException
public void deleteSegments(Set<io.druid.timeline.DataSegment> segments) throws IOException
deleteSegments
in interface IndexerMetadataStorageCoordinator
IOException
public List<io.druid.timeline.DataSegment> getUnusedSegmentsForInterval(String dataSource, org.joda.time.Interval interval)
IndexerMetadataStorageCoordinator
getUnusedSegmentsForInterval
in interface IndexerMetadataStorageCoordinator
dataSource
- 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.