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

Method execute

src/tsd/RollupDataPointRpc.java:64–79  ·  view source on GitHub ↗

Handles HTTP RPC put requests @param tsdb The TSDB to which we belong @param query The HTTP query from the user @throws IOException if there is an error parsing the query or formatting the output @throws BadRequestException if the user supplied bad data

(final TSDB tsdb, final HttpQuery query)

Source from the content-addressed store, hash-verified

62 * @throws BadRequestException if the user supplied bad data
63 */
64 @Override
65 public void execute(final TSDB tsdb, final HttpQuery query)
66 throws IOException {
67 http_requests.incrementAndGet();
68
69 // only accept POST
70 if (query.method() != HttpMethod.POST) {
71 throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED,
72 "Method not allowed", "The HTTP method [" + query.method().getName() +
73 "] is not permitted for this endpoint");
74 }
75
76 final List<RollUpDataPoint> dps = query.serializer()
77 .parsePutV1(RollUpDataPoint.class, HttpJsonSerializer.TR_ROLLUP);
78 processDataPoint(tsdb, query, dps);
79 }
80
81 /**
82 * Imports a single rolled up data point.

Callers 15

executeMethod · 0.95
executeAggOnlyMethod · 0.95
executeRollupWithAggMethod · 0.95
executeBadValueMethod · 0.95
executeMissingMetricMethod · 0.95
executeUnknownMetricMethod · 0.95
executeHBaseErrorMethod · 0.95

Calls 5

methodMethod · 0.80
serializerMethod · 0.80
processDataPointMethod · 0.80
getNameMethod · 0.65
parsePutV1Method · 0.45

Tested by 15

executeMethod · 0.76
executeAggOnlyMethod · 0.76
executeRollupWithAggMethod · 0.76
executeBadValueMethod · 0.76
executeMissingMetricMethod · 0.76
executeUnknownMetricMethod · 0.76
executeHBaseErrorMethod · 0.76