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

Method ExecKillQueryRequest

be/src/service/client-request-state.cc:2739–2767  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2737}
2738
2739Status ClientRequestState::ExecKillQueryRequest() {
2740 TUniqueId query_id = exec_request().kill_query_request.query_id;
2741 string requesting_user = exec_request().kill_query_request.requesting_user;
2742 bool is_admin = exec_request().kill_query_request.is_admin;
2743
2744 VLOG_QUERY << "Exec KillQuery: query_id=" << PrintId(query_id)
2745 << ", requesting_user=" << requesting_user << ", is_admin=" << is_admin;
2746
2747 // First try cancelling the query locally.
2748 Status status = TryKillQueryLocally(query_id, requesting_user, is_admin);
2749 if (status.code() != TErrorCode::INVALID_QUERY_HANDLE) {
2750 return status;
2751 }
2752
2753 // The current impalad is NOT the coordinator of the query. Now we have to broadcast
2754 // the kill request to all other coordinators.
2755 UniqueIdPB query_id_pb;
2756 TUniqueIdToUniqueIdPB(query_id, &query_id_pb);
2757 KillQueryRequestPB request;
2758 *request.add_query_ids() = query_id_pb;
2759 *request.mutable_requesting_user() = requesting_user;
2760 request.set_is_admin(is_admin);
2761 status = TryKillQueryRemotely(query_id, request);
2762 if (status.code() != TErrorCode::INVALID_QUERY_HANDLE) {
2763 return status;
2764 }
2765 // All the error messages are "Invalid or unknown query handle".
2766 return Status("Could not find query on any coordinator.");
2767}
2768
2769void ClientRequestState::AddTableResetHints(const TConvertTableRequest& params,
2770 Status* status) const {

Callers

nothing calls this directly

Calls 4

PrintIdFunction · 0.85
TUniqueIdToUniqueIdPBFunction · 0.85
codeMethod · 0.80
StatusClass · 0.50

Tested by

no test coverage detected