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

Method split

src/core/TsdbQuery.java:444–459  ·  view source on GitHub ↗

Splits this query into one query for the part that is covered by the rollup table (as defined in its SLA) and one to get the data for the remaining time range from the raw table. @param query The original TSQuery as parsed @param index The index of the TSQuery @param rawQuery A new TsdbQuery instanc

(final TSQuery query, final int index, final TsdbQuery rawQuery)

Source from the content-addressed store, hash-verified

442 * @throws IllegalStateException if the query is not eligible or splitting is disabled
443 */
444 public Deferred<Object> split(final TSQuery query, final int index, final TsdbQuery rawQuery) {
445 if (!needsSplitting()) {
446 throw new IllegalStateException("Query is not eligible for splitting" + this.toString());
447 }
448
449 Deferred<Object> rawResolutionDeferred = rawQuery.configureFromQuery(query, index, true);
450
451 long lastRollupTimestampMillis = rollup_query.getLastRollupTimestampSeconds() * 1000L;
452
453 boolean needsRawAndRollupData = QueryUtil.isTimestampAfter(lastRollupTimestampMillis, getStartTime());
454 if (needsRawAndRollupData) {
455 updateRollupSplitTimes(rawQuery, lastRollupTimestampMillis);
456 }
457
458 return rawResolutionDeferred;
459 }
460
461 /**
462 * Updates the timestamp of this query and the corresponding raw part in the case of a split.

Callers 15

validateMethod · 0.45
validateMethod · 0.45
buildURLSetMethod · 0.45
applyCommandLineMethod · 0.45
writePidMethod · 0.45
GnuplotInstallerClass · 0.45
initializeMethod · 0.45
configureFromQueryMethod · 0.45
TagVLiteralOrFilterMethod · 0.45
handleAssignMethod · 0.45

Calls 7

needsSplittingMethod · 0.95
toStringMethod · 0.95
isTimestampAfterMethod · 0.95
getStartTimeMethod · 0.95
configureFromQueryMethod · 0.65

Tested by

no test coverage detected