Returns whether this query needs to be split. It does if - splitting of queries is enabled globally AND - it can be split (i.e. it's a valid rollups query) AND - the table it is hitting has an SLA configured that describes the blackout period AND - the query is actually looking at data from the time
()
| 827 | * @since 2.4 |
| 828 | */ |
| 829 | @Override |
| 830 | public boolean needsSplitting() { |
| 831 | if (!tsdb.isRollupsSplittingEnabled()) { |
| 832 | // Don't split if the global config doesn't allow it |
| 833 | return false; |
| 834 | } |
| 835 | |
| 836 | if (!isRollupQuery()) { |
| 837 | // Don't split if it's hitting the raw table anyway |
| 838 | return false; |
| 839 | } |
| 840 | |
| 841 | if (rollup_query.getRollupInterval().getMaximumLag() <= 0) { |
| 842 | // Don't split if the table doesn't have a maximum lag configured |
| 843 | return false; |
| 844 | } |
| 845 | |
| 846 | return rollup_query.isInBlackoutPeriod(getEndTime()); |
| 847 | } |
| 848 | |
| 849 | /** |
| 850 | * Finds all the {@link Span}s that match this query. |