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

Method parseUIDMetaQS

src/tsd/UniqueIdRpc.java:462–482  ·  view source on GitHub ↗

Used with verb overrides to parse out values from a query string @param query The query to parse @return An UIDMeta object with configured values @throws BadRequestException if a required value was missing or could not be parsed

(final HttpQuery query)

Source from the content-addressed store, hash-verified

460 * be parsed
461 */
462 private UIDMeta parseUIDMetaQS(final HttpQuery query) {
463 final String uid = query.getRequiredQueryStringParam("uid");
464 final String type = query.getRequiredQueryStringParam("type");
465 final UIDMeta meta = new UIDMeta(UniqueId.stringToUniqueIdType(type), uid);
466 final String display_name = query.getQueryStringParam("display_name");
467 if (display_name != null) {
468 meta.setDisplayName(display_name);
469 }
470
471 final String description = query.getQueryStringParam("description");
472 if (description != null) {
473 meta.setDescription(description);
474 }
475
476 final String notes = query.getQueryStringParam("notes");
477 if (notes != null) {
478 meta.setNotes(notes);
479 }
480
481 return meta;
482 }
483
484 /**
485 * Rename UID to a new name of the given metric, tagk or tagv names

Callers 1

handleUIDMetaMethod · 0.95

Calls 6

stringToUniqueIdTypeMethod · 0.95
setDisplayNameMethod · 0.95
setDescriptionMethod · 0.95
setNotesMethod · 0.95
getQueryStringParamMethod · 0.45

Tested by

no test coverage detected