| 311 | } |
| 312 | |
| 313 | void 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 | |
| 341 | void ImpalaHttpHandler::QueryAiAnalysisHandler(const Webserver::WebRequest& req, |
| 342 | Document* document) { |
nothing calls this directly
no test coverage detected