| 1307 | } |
| 1308 | |
| 1309 | void ImpalaHttpHandler::QueryBackendsHandler( |
| 1310 | const Webserver::WebRequest& req, Document* document) { |
| 1311 | TUniqueId query_id; |
| 1312 | Status status = ParseIdFromRequest(req, &query_id, "query_id"); |
| 1313 | Value query_id_val(PrintId(query_id), document->GetAllocator()); |
| 1314 | document->AddMember("query_id", query_id_val, document->GetAllocator()); |
| 1315 | if (!status.ok()) { |
| 1316 | // Redact the error message, it may contain part or all of the query. |
| 1317 | Value json_error(RedactCopy(status.GetDetail()), document->GetAllocator()); |
| 1318 | document->AddMember("error", json_error, document->GetAllocator()); |
| 1319 | return; |
| 1320 | } |
| 1321 | |
| 1322 | QueryHandle query_handle; |
| 1323 | status = server_->GetQueryHandle(query_id, &query_handle); |
| 1324 | if (status.ok()) { |
| 1325 | if (query_handle->GetCoordinator() == nullptr) { |
| 1326 | return; |
| 1327 | } |
| 1328 | query_handle->GetCoordinator()->BackendsToJson(document); |
| 1329 | } else { |
| 1330 | VLOG(1) << "Failed to get backends of the query: " << status.GetDetail(); |
| 1331 | } |
| 1332 | } |
| 1333 | |
| 1334 | void ImpalaHttpHandler::QueryFInstancesHandler( |
| 1335 | const Webserver::WebRequest& req, Document* document) { |
nothing calls this directly
no test coverage detected