public class ServerManager extends Object implements QuerySegmentWalker
Constructor and Description |
---|
ServerManager(SegmentLoader segmentLoader,
QueryRunnerFactoryConglomerate conglomerate,
com.metamx.emitter.service.ServiceEmitter emitter,
ExecutorService exec,
ExecutorService cachingExec,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Cache cache,
CacheConfig cacheConfig) |
Modifier and Type | Method and Description |
---|---|
void |
dropSegment(io.druid.timeline.DataSegment segment) |
Map<String,Long> |
getDataSourceCounts() |
Map<String,Long> |
getDataSourceSizes() |
<T> QueryRunner<T> |
getQueryRunnerForIntervals(Query<T> query,
Iterable<org.joda.time.Interval> intervals)
Gets the Queryable for a given interval, the Queryable returned can be any version(s) or partitionNumber(s)
such that it represents the interval.
|
<T> QueryRunner<T> |
getQueryRunnerForSegments(Query<T> query,
Iterable<io.druid.query.SegmentDescriptor> specs)
Gets the Queryable for a given list of SegmentSpecs.
|
boolean |
isSegmentCached(io.druid.timeline.DataSegment segment) |
boolean |
loadSegment(io.druid.timeline.DataSegment segment)
Load a single segment.
|
@Inject public ServerManager(SegmentLoader segmentLoader, QueryRunnerFactoryConglomerate conglomerate, com.metamx.emitter.service.ServiceEmitter emitter, ExecutorService exec, ExecutorService cachingExec, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Cache cache, CacheConfig cacheConfig)
public boolean isSegmentCached(io.druid.timeline.DataSegment segment) throws io.druid.segment.loading.SegmentLoadingException
io.druid.segment.loading.SegmentLoadingException
public boolean loadSegment(io.druid.timeline.DataSegment segment) throws io.druid.segment.loading.SegmentLoadingException
segment
- segment to loadio.druid.segment.loading.SegmentLoadingException
- if the segment cannot be loadedpublic void dropSegment(io.druid.timeline.DataSegment segment) throws io.druid.segment.loading.SegmentLoadingException
io.druid.segment.loading.SegmentLoadingException
public <T> QueryRunner<T> getQueryRunnerForIntervals(Query<T> query, Iterable<org.joda.time.Interval> intervals)
QuerySegmentWalker
getQueryRunnerForIntervals
in interface QuerySegmentWalker
T
- query result typequery
- the query to find a Queryable forintervals
- the intervals to find a Queryable forpublic <T> QueryRunner<T> getQueryRunnerForSegments(Query<T> query, Iterable<io.druid.query.SegmentDescriptor> specs)
QuerySegmentWalker
getQueryRunnerForSegments
in interface QuerySegmentWalker
T
- the query result typequery
- the query to return a Queryable forspecs
- the list of SegmentSpecs to find a Queryable forCopyright © 2011–2015. All rights reserved.