MCPcopy
hub / github.com/OpenTSDB/opentsdb / fetchMultipleAnnotations

Method fetchMultipleAnnotations

src/tsd/AnnotationRpc.java:357–370  ·  view source on GitHub ↗
(final TSDB tsdb, final Annotation note,
                                        final HttpQuery query)

Source from the content-addressed store, hash-verified

355 }
356
357 private void fetchMultipleAnnotations(final TSDB tsdb, final Annotation note,
358 final HttpQuery query) throws Exception {
359 if (note.getEndTime() == 0) {
360 note.setEndTime(System.currentTimeMillis());
361 }
362 final List<Annotation> annotations =
363 Annotation.getGlobalAnnotations(tsdb, note.getStartTime(), note.getEndTime())
364 .joinUninterruptibly();
365 if (annotations == null) {
366 throw new BadRequestException(HttpResponseStatus.NOT_FOUND,
367 "Unable to locate annotations in storage");
368 }
369 query.sendReply(query.serializer().formatAnnotationsV1(annotations));
370 }
371
372 /**
373 * Parses a query string for a bulk delet request

Callers 1

executeMethod · 0.95

Calls 8

getGlobalAnnotationsMethod · 0.95
sendReplyMethod · 0.80
serializerMethod · 0.80
getEndTimeMethod · 0.65
setEndTimeMethod · 0.65
getStartTimeMethod · 0.65
currentTimeMillisMethod · 0.45
formatAnnotationsV1Method · 0.45

Tested by

no test coverage detected