public class PartitionAvailability extends BaseCompositeAvailability implements Availability
Availability
which describes a union of source availabilities, filtered by request
parameters, such that all sources which pertain to a query are considered when calculating availability.
The supplied availabilityFilters also allows the query to be optimized such that only relevant availabilities are
used to determine the availability for a given PhysicalDataSourceConstraint
.
The typical use is that the schemas of all sources will be the same, and if they are not, the non merging fields will be added and filled with null values.
For example, with two source availabilities such that:
+------------------+---------------+
| part 1 | part 2 |
+------------------+---------------+
| [2017/2017-02] | [2017/2018] |
+------------------+---------------+
If the constraint participates in both parts:
+---------------------+
| availability(1,2) |
+---------------------+
| [2017/2017-02] |
+---------------------+
If the constraint participates only in the larger partition:
+-------------------+
| availability(2) |
+-------------------+
| [2017/2018] |
+-------------------+
Constructor and Description |
---|
PartitionAvailability(Map<Availability,DataSourceFilter> availabilityFilters)
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 . |
Set<DataSourceName> |
getDataSourceNames(PhysicalDataSourceConstraint constraint)
The names of the data sources backing this availability as filtered by the constraint.
|
int |
hashCode() |
String |
toString() |
getAllAvailableIntervals, getAllSourceAvailabilities, getDataSourceNames
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAllAvailableIntervals, getAvailableIntervals, getAvailableIntervals, getDataSourceNames, getDataSourceNames
public PartitionAvailability(@NotNull Map<Availability,DataSourceFilter> availabilityFilters)
availabilityFilters
- A map of availabilities to filter functions that determine which requests they
participate inpublic 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
spublic Set<DataSourceName> getDataSourceNames(PhysicalDataSourceConstraint constraint)
Availability
getDataSourceNames
in interface Availability
constraint
- The constraint to filter data source names.Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.