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

Method execute

src/tsd/GraphHandler.java:124–144  ·  view source on GitHub ↗
(final TSDB tsdb, final HttpQuery query)

Source from the content-addressed store, hash-verified

122 }
123
124 public void execute(final TSDB tsdb, final HttpQuery query) {
125 if (!query.hasQueryStringParam("json")
126 && !query.hasQueryStringParam("png")
127 && !query.hasQueryStringParam("ascii")) {
128 String uri = query.request().getUri();
129 if (uri.length() < 4) { // Shouldn't happen...
130 uri = "/"; // But just in case, redirect.
131 } else {
132 uri = "/#" + uri.substring(3); // Remove "/q?"
133 }
134 query.redirect(uri);
135 return;
136 }
137 try {
138 doGraph(tsdb, query);
139 } catch (IOException e) {
140 query.internalError(e);
141 } catch (IllegalArgumentException e) {
142 query.badRequest(e.getMessage());
143 }
144 }
145
146 // TODO(HugoMFernandes): Most of this (query-related) logic is implemented in
147 // net.opentsdb.tsd.QueryRpc.java (which actually does this asynchronously),

Callers

nothing calls this directly

Calls 7

doGraphMethod · 0.95
getMessageMethod · 0.65
hasQueryStringParamMethod · 0.45
requestMethod · 0.45
redirectMethod · 0.45
internalErrorMethod · 0.45
badRequestMethod · 0.45

Tested by

no test coverage detected