Helper that writes a data point for each row that the get request should cover. @throws Exception if something went pear shaped.
()
| 1029 | * @throws Exception if something went pear shaped. |
| 1030 | */ |
| 1031 | protected void setupStorage() throws Exception { |
| 1032 | setDataPointStorage(); |
| 1033 | spans = new TreeMap<byte[], Span>(new TsdbQuery.SpanCmp(TSDB.metrics_width())); |
| 1034 | |
| 1035 | int value = 1; |
| 1036 | int ts = (int) start_ts; |
| 1037 | tags.clear(); |
| 1038 | tags.put(TAGK_STRING, "A"); |
| 1039 | tags.put(TAGK_B_STRING, "D"); |
| 1040 | //tags.put("E", "F"); |
| 1041 | while (ts <= (int) end_ts) { |
| 1042 | tsdb.addPoint(METRIC_STRING, (long) ts, (long) value++, tags).join(); |
| 1043 | ts += 3600; |
| 1044 | } |
| 1045 | |
| 1046 | value = 11; |
| 1047 | ts = (int) start_ts; |
| 1048 | tags.clear(); |
| 1049 | tags.put(TAGK_STRING, "B"); |
| 1050 | tags.put(TAGK_B_STRING, "D"); |
| 1051 | // tags.put("E", "F"); |
| 1052 | while (ts <= (int) end_ts) { |
| 1053 | tsdb.addPoint(METRIC_STRING, (long) ts, (long) value++, tags).join(); |
| 1054 | ts += 3600; |
| 1055 | } |
| 1056 | |
| 1057 | value = 111; |
| 1058 | ts = (int) start_ts; |
| 1059 | tags.clear(); |
| 1060 | tags.put(TAGK_STRING, "C"); |
| 1061 | tags.put(TAGK_B_STRING, "D"); |
| 1062 | // tags.put("E", "F"); |
| 1063 | while (ts <= (int) end_ts) { |
| 1064 | tsdb.addPoint(METRIC_STRING, (long) ts, (long) value++, tags).join(); |
| 1065 | ts += 3600; |
| 1066 | } |
| 1067 | |
| 1068 | // value = 1111; |
| 1069 | // ts = (int) start_ts; |
| 1070 | // tags.clear(); |
| 1071 | // tags.put(TAGK_STRING, "A"); |
| 1072 | // tags.put(TAGK_B_STRING, "D"); |
| 1073 | // // tags.put("E", "G"); |
| 1074 | // while (ts <= (int) end_ts) { |
| 1075 | // tsdb.addPoint(METRIC_STRING, (long) ts, (long) value++, tags).join(); |
| 1076 | // ts += 3600; |
| 1077 | // } |
| 1078 | // |
| 1079 | // value = 11111; |
| 1080 | // ts = (int) start_ts; |
| 1081 | // tags.clear(); |
| 1082 | // tags.put(TAGK_STRING, "B"); |
| 1083 | // tags.put(TAGK_B_STRING, "D"); |
| 1084 | // // tags.put("E", "G"); |
| 1085 | // while (ts <= (int) end_ts) { |
| 1086 | // tsdb.addPoint(METRIC_STRING, (long) ts, (long) value++, tags).join(); |
| 1087 | // ts += 3600; |
| 1088 | // } |
no test coverage detected