@Singleton public class PartialDataHandler extends Object
Constructor and Description |
---|
PartialDataHandler() |
Modifier and Type | Method and Description |
---|---|
protected static SimplifiedIntervalList |
collectBucketedIntervalsNotInIntervalList(SimplifiedIntervalList supplyIntervals,
SimplifiedIntervalList bucketedIntervals,
Granularity granularity)
Collect all subintervals from a bucketed collection that are not subintervals of a supply.
|
SimplifiedIntervalList |
findMissingTimeGrainIntervals(SimplifiedIntervalList availableIntervals,
SimplifiedIntervalList requestedIntervals,
Granularity granularity)
Find the holes in the passed in intervals at a given granularity.
|
public SimplifiedIntervalList findMissingTimeGrainIntervals(@NotNull SimplifiedIntervalList availableIntervals, @NotNull SimplifiedIntervalList requestedIntervals, Granularity granularity)
Requested Interval with grain |--------|--------|--------|--------|--------|--------|--------|--------| Available intervals |-------------| |--------------------| |---------------------| Missing Intervals: |--------|--------|--------| |--------|
Any requested subinterval bucket that is partially unavailable is collected and returned in a simplified form.
availableIntervals
- The intervals available in the tablesrequestedIntervals
- The intervals that may not be fully satisfiedgranularity
- The granularity at which to find missing intervalsprotected static SimplifiedIntervalList collectBucketedIntervalsNotInIntervalList(SimplifiedIntervalList supplyIntervals, SimplifiedIntervalList bucketedIntervals, Granularity granularity)
The bucketed list of intervals are split by grain before being tested as subintervals of the supply list.
supplyIntervals
- The intervals which bucketed intervals are being tested againstbucketedIntervals
- The grain bucketed intervals to collect if not in the supplygranularity
- The grain at which to split the bucketingIntervalsCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.