Groups multiple spans together and offers a dynamic "view" on them. This is used for queries to the TSDB, where we might group multiple Spans that are for the same time series but different tags together. We need to "hide" data points that are outside of the time period of the query and
| 46 | * iterator when using the {@link Span.DownsamplingIterator}. |
| 47 | */ |
| 48 | final class SpanGroup extends AbstractSpanGroup { |
| 49 | /** Annotations */ |
| 50 | private final ArrayList<Annotation> annotations; |
| 51 | |
| 52 | /** Start time (UNIX timestamp in seconds or ms) on 32 bits ("unsigned" int). */ |
| 53 | private final long start_time; |
| 54 | |
| 55 | /** End time (UNIX timestamp in seconds or ms) on 32 bits ("unsigned" int). */ |
| 56 | private final long end_time; |
| 57 | |
| 58 | /** |
| 59 | * The tags of this group. |
| 60 | * This is the intersection set between the tags of all the Spans |
| 61 | * in this group. |
| 62 | * @see #computeTags |
| 63 | */ |
| 64 | private Map<String, String> tags; |
| 65 | private ByteMap<byte[]> tag_uids; |
| 66 | |
| 67 | /** |
| 68 | * The names of the tags that aren't shared by every single data point. |
| 69 | * This is the symmetric difference between the tags of all the Spans |
| 70 | * in this group. |
| 71 | * @see #computeTags |
| 72 | */ |
| 73 | private List<String> aggregated_tags; |
| 74 | private Set<byte[]> aggregated_tag_uids; |
| 75 | |
| 76 | /** Spans in this group. They must all be for the same metric. */ |
| 77 | private final ArrayList<Span> spans = new ArrayList<Span>(); |
| 78 | |
| 79 | /** If true, use rate of change instead of actual values. */ |
| 80 | private final boolean rate; |
| 81 | |
| 82 | /** Specifies the various options for rate calculations */ |
| 83 | private RateOptions rate_options; |
| 84 | |
| 85 | /** Aggregator to use to aggregate data points from different Spans. */ |
| 86 | private final Aggregator aggregator; |
| 87 | |
| 88 | /** Downsampling specification to use, if any (can be {@code null}). */ |
| 89 | private DownsamplingSpecification downsampler; |
| 90 | |
| 91 | /** Start timestamp of the query for filtering */ |
| 92 | private final long query_start; |
| 93 | |
| 94 | /** End timestamp of the query for filtering */ |
| 95 | private final long query_end; |
| 96 | |
| 97 | /** Index of the query in the TSQuery class */ |
| 98 | private final int query_index; |
| 99 | |
| 100 | /** An optional rollup query. */ |
| 101 | private final RollupQuery rollup_query; |
| 102 | |
| 103 | /** The TSDB to which we belong, used for resolution */ |
| 104 | private final TSDB tsdb; |
| 105 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…