public class SegmentIntervalsHashIdGenerator extends Object implements QuerySigningService<Long>
Constructor and Description |
---|
SegmentIntervalsHashIdGenerator(DataSourceMetadataService dataSourceMetadataService)
Build a SegmentIntervalsHashIdGenerator that uses the raw simplified intervals of a druidAggregationQuery to
create a segmentId.
|
SegmentIntervalsHashIdGenerator(DataSourceMetadataService dataSourceMetadataService,
Map<Class,RequestedIntervalsFunction> requestedIntervalsQueryExtractionFunctions)
Build a SegmentIntervalsHashIdGenerator that generates a segmentId using the provided signingFunctions.
|
SegmentIntervalsHashIdGenerator(PhysicalTableDictionary physicalTableDictionary,
DataSourceMetadataService dataSourceMetadataService)
Deprecated.
phyiscalTableDictionary is not used
|
SegmentIntervalsHashIdGenerator(PhysicalTableDictionary physicalTableDictionary,
DataSourceMetadataService dataSourceMetadataService,
Map<Class,RequestedIntervalsFunction> requestedIntervalsQueryExtractionFunctions)
Deprecated.
phyiscalTableDictionary is not used
|
Modifier and Type | Method and Description |
---|---|
Optional<Long> |
getSegmentHash(Stream<SortedMap<org.joda.time.DateTime,Map<String,SegmentInfo>>> requestedSegments)
Given a set of requested segments, calculate a hash to represent the segment set Id.
|
Optional<Long> |
getSegmentSetId(DruidAggregationQuery<?> query)
Return an identifier that corresponds to the set of segments that a query references.
|
@Deprecated public SegmentIntervalsHashIdGenerator(PhysicalTableDictionary physicalTableDictionary, DataSourceMetadataService dataSourceMetadataService, Map<Class,RequestedIntervalsFunction> requestedIntervalsQueryExtractionFunctions)
physicalTableDictionary
- The dictionary of the physical tablesdataSourceMetadataService
- A Service to get information about segment metadatarequestedIntervalsQueryExtractionFunctions
- Maps a Class to the Function that should be used to compute
requestedIntervals for a given querypublic SegmentIntervalsHashIdGenerator(DataSourceMetadataService dataSourceMetadataService, Map<Class,RequestedIntervalsFunction> requestedIntervalsQueryExtractionFunctions)
dataSourceMetadataService
- A Service to get information about segment metadatarequestedIntervalsQueryExtractionFunctions
- Maps a Class to the Function that should be used to compute
requestedIntervals for a given query@Deprecated public SegmentIntervalsHashIdGenerator(PhysicalTableDictionary physicalTableDictionary, DataSourceMetadataService dataSourceMetadataService)
physicalTableDictionary
- The dictionary of the physical tablesdataSourceMetadataService
- A Service to get information about segment metadatapublic SegmentIntervalsHashIdGenerator(DataSourceMetadataService dataSourceMetadataService)
dataSourceMetadataService
- A Service to get information about segment metadatapublic Optional<Long> getSegmentSetId(DruidAggregationQuery<?> query)
QuerySigningService
getSegmentSetId
in interface QuerySigningService<Long>
query
- The druid aggregation query.public Optional<Long> getSegmentHash(Stream<SortedMap<org.joda.time.DateTime,Map<String,SegmentInfo>>> requestedSegments)
requestedSegments
- A set of requestedSegmentsCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.