MCPcopy Create free account
hub / github.com/apache/impala / QueryProfileHandler

Method QueryProfileHandler

be/src/service/impala-http-handler.cc:313–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313void ImpalaHttpHandler::QueryProfileHandler(const Webserver::WebRequest& req,
314 Document* document) {
315 TUniqueId unique_id;
316 Status parse_status = ParseIdFromRequest(req, &unique_id, "query_id");
317 if (!parse_status.ok()) {
318 Value error(parse_status.GetDetail(), document->GetAllocator());
319 document->AddMember("error", error, document->GetAllocator());
320 return;
321 }
322
323 Value query_id_val(PrintId(unique_id), document->GetAllocator());
324 document->AddMember("query_id", query_id_val, document->GetAllocator());
325
326 ImpalaServer::RuntimeProfileOutput runtime_profile;
327 stringstream ss;
328 runtime_profile.string_output = &ss;
329 Status status = server_->GetRuntimeProfileOutput(
330 unique_id, "", TRuntimeProfileFormat::STRING, &runtime_profile);
331 if (!status.ok()) {
332 Value error(status.GetDetail(), document->GetAllocator());
333 document->AddMember("error", error, document->GetAllocator());
334 return;
335 }
336
337 Value profile(ss.str(), document->GetAllocator());
338 document->AddMember("profile", profile, document->GetAllocator());
339}
340
341void ImpalaHttpHandler::QueryAiAnalysisHandler(const Webserver::WebRequest& req,
342 Document* document) {

Callers

nothing calls this directly

Calls 7

ParseIdFromRequestFunction · 0.85
PrintIdFunction · 0.85
GetDetailMethod · 0.80
okMethod · 0.45
AddMemberMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected