(final TSDB tsdb, final Annotation note,
final HttpQuery query)
| 343 | } |
| 344 | |
| 345 | private void fetchSingleAnnotation(final TSDB tsdb, final Annotation note, |
| 346 | final HttpQuery query) throws Exception { |
| 347 | final Annotation stored_annotation = |
| 348 | Annotation.getAnnotation(tsdb, note.getTSUID(), note.getStartTime()) |
| 349 | .joinUninterruptibly(); |
| 350 | if (stored_annotation == null) { |
| 351 | throw new BadRequestException(HttpResponseStatus.NOT_FOUND, |
| 352 | "Unable to locate annotation in storage"); |
| 353 | } |
| 354 | query.sendReply(query.serializer().formatAnnotationV1(stored_annotation)); |
| 355 | } |
| 356 | |
| 357 | private void fetchMultipleAnnotations(final TSDB tsdb, final Annotation note, |
| 358 | final HttpQuery query) throws Exception { |
no test coverage detected