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

Method parseTreeTSUIDsListV1

src/tsd/HttpJsonSerializer.java:446–455  ·  view source on GitHub ↗

Parses a tree ID and optional list of TSUIDs to search for collisions or not matched TSUIDs. @return A map with "treeId" as an integer and optionally "tsuids" as a List @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed

()

Source from the content-addressed store, hash-verified

444 * @throws BadRequestException if the content was missing or parsing failed
445 */
446 public Map<String, Object> parseTreeTSUIDsListV1() {
447 final String json = query.getContent();
448 if (json == null || json.isEmpty()) {
449 throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
450 "Missing message content",
451 "Supply valid JSON formatted data in the body of your request");
452 }
453
454 return JSON.parseToObject(json, TR_HASH_MAP_OBJ);
455 }
456
457 /**
458 * Parses an annotation object

Callers

nothing calls this directly

Calls 3

parseToObjectMethod · 0.95
isEmptyMethod · 0.80
getContentMethod · 0.45

Tested by

no test coverage detected