public class MetricUnionAvailability extends BaseCompositeAvailability implements Availability
Availability
which describes a union of source availabilities, filtered by required
metrics and then intersected on time available for required columns.
For example, with three source availabilities with the following metric availability:
Source Availability 1:
+---------------+
| metric1 |
+---------------+
| [2017/2018] |
+---------------+
Source Availability 2:
+------------------+
| metric2 |
+------------------+
| [2016/2017-03] |
+------------------+
Source Availability 3:
+-----------+
| metric3 |
+-----------+
| None |
+-----------+
Then the available intervals for the following sets of metrics required by a constraint are:
+----------------------+------------------+ | Requested metrics | Available | +----------------------+------------------+ | [metric1] | [2017/2018] | +----------------------+------------------+ | [metric2] | [2016/2017-03] | +----------------------+------------------+ | [metric1, metric2] | [2017/2018] | +----------------------+------------------+ | [metric1, metric3] | [] | +-------------------+---------------------+
Constructor and Description |
---|
MetricUnionAvailability(Set<Availability> availabilities,
Map<Availability,Set<String>> availabilitiesToMetricNames)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
SimplifiedIntervalList |
getAvailableIntervals(PhysicalDataSourceConstraint constraint)
Fetch a
SimplifiedIntervalList representing the coalesced available intervals on this availability as
filtered by the PhysicalDataSourceConstraint . |
int |
hashCode() |
String |
toString() |
getAllAvailableIntervals, getAllSourceAvailabilities, getDataSourceNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAllAvailableIntervals, getAvailableIntervals, getAvailableIntervals, getDataSourceNames, getDataSourceNames, getDataSourceNames
public MetricUnionAvailability(@NotNull Set<Availability> availabilities, @NotNull Map<Availability,Set<String>> availabilitiesToMetricNames)
availabilities
- A set of Availabilities whose Dimension schemas are (typically) the same and
the Metric columns are unique(i.e. no overlap) on every availabilityavailabilitiesToMetricNames
- A map of all availabilities to set of metric names
will respond withpublic SimplifiedIntervalList getAvailableIntervals(PhysicalDataSourceConstraint constraint)
Availability
SimplifiedIntervalList
representing the coalesced available intervals on this availability as
filtered by the PhysicalDataSourceConstraint
.getAvailableIntervals
in interface Availability
constraint
- PhysicalDataSourceConstraint containing
Schema
and ApiFilter
sCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.