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

Method execute

src/tsd/UniqueIdRpc.java:50–73  ·  view source on GitHub ↗
(TSDB tsdb, HttpQuery query)

Source from the content-addressed store, hash-verified

48final class UniqueIdRpc implements HttpRpc {
49
50 @Override
51 public void execute(TSDB tsdb, HttpQuery query) throws IOException {
52
53 // the uri will be /api/vX/uid/? or /api/uid/?
54 final String[] uri = query.explodeAPIPath();
55 final String endpoint = uri.length > 1 ? uri[1] : "";
56
57 if (endpoint.toLowerCase().equals("assign")) {
58 this.handleAssign(tsdb, query);
59 return;
60 } else if (endpoint.toLowerCase().equals("uidmeta")) {
61 this.handleUIDMeta(tsdb, query);
62 return;
63 } else if (endpoint.toLowerCase().equals("tsmeta")) {
64 this.handleTSMeta(tsdb, query);
65 return;
66 } else if (endpoint.toLowerCase().equals("rename")) {
67 this.handleRename(tsdb, query);
68 return;
69 } else {
70 throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED,
71 "Other UID endpoints have not been implemented yet");
72 }
73 }
74
75 /**
76 * Assigns UIDs to the given metric, tagk or tagv names if applicable

Callers

nothing calls this directly

Calls 6

handleAssignMethod · 0.95
handleUIDMetaMethod · 0.95
handleTSMetaMethod · 0.95
handleRenameMethod · 0.95
explodeAPIPathMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected