MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / needsSplitting

Method needsSplitting

src/core/TsdbQuery.java:829–847  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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.

Callers 3

splitMethod · 0.95

Calls 6

isRollupQueryMethod · 0.95
getEndTimeMethod · 0.95
getMaximumLagMethod · 0.80
isInBlackoutPeriodMethod · 0.80
getRollupIntervalMethod · 0.45