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

Function ParseIdFromRequest

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

We expect the id to be passed as one parameter. Eg: 'query_id' or 'session_id'. Returns true if the id was present and valid; false otherwise.

Source from the content-addressed store, hash-verified

83// We expect the id to be passed as one parameter. Eg: 'query_id' or 'session_id'.
84// Returns true if the id was present and valid; false otherwise.
85static Status ParseIdFromRequest(const Webserver::WebRequest& req, TUniqueId* id,
86 const std::string &to_find) {
87 const auto& args = req.parsed_args;
88 Webserver::ArgumentMap::const_iterator it = args.find(to_find);
89 if (it == args.end()) {
90 return Status(Substitute("No '$0' argument found.", to_find));
91 } else {
92 if (ParseId(it->second, id)) return Status::OK();
93 return Status(Substitute("Could not parse '$0' argument: $1", to_find, it->second));
94 }
95}
96
97}
98

Callers 10

CancelQueryHandlerMethod · 0.85
CloseSessionHandlerMethod · 0.85
QueryProfileHandlerMethod · 0.85
QueryProfileHelperMethod · 0.85
QueryMemoryHandlerMethod · 0.85
QueryBackendsHandlerMethod · 0.85
QuerySummaryHandlerMethod · 0.85

Calls 6

SubstituteFunction · 0.85
ParseIdFunction · 0.85
OKFunction · 0.85
StatusClass · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected