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

Method QueryBackendsHandler

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

Source from the content-addressed store, hash-verified

1307}
1308
1309void 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
1334void ImpalaHttpHandler::QueryFInstancesHandler(
1335 const Webserver::WebRequest& req, Document* document) {

Callers

nothing calls this directly

Calls 9

ParseIdFromRequestFunction · 0.85
PrintIdFunction · 0.85
RedactCopyFunction · 0.85
GetDetailMethod · 0.80
GetQueryHandleMethod · 0.80
GetCoordinatorMethod · 0.80
BackendsToJsonMethod · 0.80
AddMemberMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected