MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / encode

Method encode

src/core/HistogramCodecManager.java:185–190  ·  view source on GitHub ↗

Finds the proper codec and calls it's encode method to create a byte array with the given ID as the first byte. @param id The ID of the histogram type to search for. @param data_point The non-null data point to encode. @param include_id Whether or not to include the ID prefix when encoding. @return

(final int id, 
                       final Histogram data_point, 
                       final boolean include_id)

Source from the content-addressed store, hash-verified

183 * the histogram may have been of the wrong type or failed encoding.
184 */
185 public byte[] encode(final int id,
186 final Histogram data_point,
187 final boolean include_id) {
188 final HistogramDataPointCodec codec = getCodec(id);
189 return codec.encode(data_point, include_id);
190 }
191
192 /**
193 * Finds the proper codec and calls it's decode method to return the histogram

Callers 4

processDataPointMethod · 0.45
importDataPointMethod · 0.45
addFormatsMethod · 0.45
refreshGraphMethod · 0.45

Calls 2

getCodecMethod · 0.95
encodeMethod · 0.95

Tested by

no test coverage detected