Generates a list of Unix Epoch Timestamps for the row key base times given the start and end times of the query and rollup interval given. @return A non-null list of at least one base row.
()
| 1021 | * @return A non-null list of at least one base row. |
| 1022 | */ |
| 1023 | @VisibleForTesting |
| 1024 | List<Long> prepareRowBaseTimesRollup() { |
| 1025 | final RollupInterval interval = rollup_query.getRollupInterval(); |
| 1026 | |
| 1027 | // standard TSDB table format, i.e. we're using the default table and schema |
| 1028 | if (interval.getUnits() == 'h') { |
| 1029 | return prepareRowBaseTimes(); |
| 1030 | } else { |
| 1031 | final List<Long> row_base_times = new ArrayList<Long>( |
| 1032 | (int) ((end_row_time - start_row_time) / interval.getIntervals())); |
| 1033 | |
| 1034 | long ts = RollupUtils.getRollupBasetime(start_row_time, interval); |
| 1035 | while (ts <= end_row_time) { |
| 1036 | row_base_times.add(ts); |
| 1037 | // TODO - possible this could overshoot in some cases. It shouldn't |
| 1038 | // if the rollups are properly configured, but... you know. Check it. |
| 1039 | ts = RollupUtils.getRollupBasetime(ts + |
| 1040 | (interval.getIntervalSeconds() * interval.getIntervals()), interval); |
| 1041 | } |
| 1042 | return row_base_times; |
| 1043 | } |
| 1044 | } |
| 1045 | |
| 1046 | /** |
| 1047 | * We have multiple tagks and each tagk may has multiple possible values. |