Part of tools -OpenTSDB

This part of the process used to talk about do not quite understand the concept of what is the main reference official website and OpenTSDB use summary

1. downSample resampling

    Sometimes playing a second point, the data would seem to show so much mess, usually does not require such precise data. Accuracy can drop manner after the polymerization of the data points over time as a data point, such as each hour of a data aggregation of data points, this will show only 168 data points, it may query if the time selected drop size range accuracy.

 1 public static String getDownSampler(long start, long end) {
 2     String downSampler;
 3     if (end - start < 24 * 60 * 60 * 1000L) { // 一天
 4       downSampler = 1m-avg;
 5     } else if (end - start < 604800000) { // 一周
 6       downSampler = 5m-avg;
 7     } else {
 8       downSampler = 30m-avg;
 9     }
10     return downSampler;
11  }

2. aggregator

aggregator used when accuracy downsample drop lines and a plurality of polymerization time, by the operator of data points gathered into a plurality of data points, such avg, sum.

 

Guess you like

Origin www.cnblogs.com/lcmichelle/p/11371625.html