MCPcopy
hub / github.com/OpenTSDB/opentsdb / prepareRowBaseTimes

Method prepareRowBaseTimes

src/core/MultiGetQuery.java:1005–1016  ·  view source on GitHub ↗

Generates a list of Unix Epoch Timestamps for the row key base times given the start and end times of the query. @return A non-null list of at least one base row.

()

Source from the content-addressed store, hash-verified

1003 * @return A non-null list of at least one base row.
1004 */
1005 @VisibleForTesting
1006 List<Long> prepareRowBaseTimes() {
1007 final ArrayList<Long> row_base_time_list = new ArrayList<Long>(
1008 (int) ((end_row_time - start_row_time) / Const.MAX_TIMESPAN));
1009 // NOTE: inclusive end here
1010 long ts = (start_row_time - (start_row_time % Const.MAX_TIMESPAN));
1011 while (ts <= end_row_time) {
1012 row_base_time_list.add(ts);
1013 ts += Const.MAX_TIMESPAN;
1014 }
1015 return row_base_time_list;
1016 }
1017
1018 /**
1019 * Generates a list of Unix Epoch Timestamps for the row key base times given

Callers 4

prepareRowBaseTimesMethod · 0.95
prepareRequestsMethod · 0.95

Calls 1

addMethod · 0.45

Tested by 2

prepareRowBaseTimesMethod · 0.76
prepareRequestsMethod · 0.76