MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / updateRollupSplitTimes

Method updateRollupSplitTimes

src/core/TsdbQuery.java:473–487  ·  view source on GitHub ↗

Updates the timestamp of this query and the corresponding raw part in the case of a split. Sets the start and end times for this query so that it hits the rollup table until the given timestamp. Also updates the passed {@param rawQuery} with the new start time so that it hits the raw table for poin

(final TsdbQuery rawQuery, long splitTimestamp)

Source from the content-addressed store, hash-verified

471 * @param splitTimestamp The timestamp until when rollup data is guaranteed to be available
472 */
473 private void updateRollupSplitTimes(final TsdbQuery rawQuery, long splitTimestamp) {
474 setEndTime(splitTimestamp);
475
476 boolean isStartTimeInSeconds = (getStartTime() & Const.SECOND_MASK) == 0;
477 if (isStartTimeInSeconds) {
478 setStartTime(getStartTime() * 1000L);
479 }
480
481 boolean isRawEndTimeInSeconds = (rawQuery.getEndTime() & Const.SECOND_MASK) == 0;
482 if (isRawEndTimeInSeconds) {
483 rawQuery.setEndTime(rawQuery.getEndTime() * 1000L);
484 }
485
486 rawQuery.setStartTime(splitTimestamp);
487 }
488
489 @Override
490 public Deferred<Object> configureFromQuery(final TSQuery query,

Callers 1

splitMethod · 0.95

Calls 6

setEndTimeMethod · 0.95
getStartTimeMethod · 0.95
setStartTimeMethod · 0.95
getEndTimeMethod · 0.65
setEndTimeMethod · 0.65
setStartTimeMethod · 0.65

Tested by

no test coverage detected