public class SegmentLocalCacheLoader extends Object implements SegmentLoader
| Constructor and Description |
|---|
SegmentLocalCacheLoader(SegmentCacheManager cacheManager,
IndexIO indexIO,
com.fasterxml.jackson.databind.ObjectMapper mapper) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(DataSegment segment)
cleanup any state used by this segment
|
ReferenceCountingSegment |
getSegment(DataSegment segment,
boolean lazy,
SegmentLazyLoadFailCallback loadFailed)
Returns a
ReferenceCountingSegment that will be added by the SegmentManager
to the VersionedIntervalTimeline. |
@Inject public SegmentLocalCacheLoader(SegmentCacheManager cacheManager, IndexIO indexIO, com.fasterxml.jackson.databind.ObjectMapper mapper)
public ReferenceCountingSegment getSegment(DataSegment segment, boolean lazy, SegmentLazyLoadFailCallback loadFailed) throws SegmentLoadingException
SegmentLoaderReferenceCountingSegment that will be added by the SegmentManager
to the VersionedIntervalTimeline. This method can be called multiple times
by the SegmentManager and implementation can either return same ReferenceCountingSegment
or a different ReferenceCountingSegment. Caller should not assume any particular behavior.
Returning a ReferenceCountingSegment will let custom implementations keep track of reference count for
segments that the custom implementations are creating. That way, custom implementations can know when the segment
is in use or not.getSegment in interface SegmentLoadersegment - - Segment to loadlazy - - Whether column metadata de-serialization is to be deferred to access time. Setting this flag to true can speed up segment loadingloadFailed - - Callback to invoke if lazy loading fails during column access.SegmentLoadingException - - If there is an error in loading the segmentpublic void cleanup(DataSegment segment)
SegmentLoadercleanup in interface SegmentLoaderCopyright © 2011–2021 The Apache Software Foundation. All rights reserved.