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

Method FillUsersInfo

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

Source from the content-addressed store, hash-verified

879}
880
881void ImpalaHttpHandler::FillUsersInfo(Document* document) {
882 Value users(kArrayType);
883 {
884 lock_guard<mutex> l(server_->per_user_session_count_lock_);
885 for (auto const& it : server_->per_user_session_count_map_) {
886 const string& name = it.first;
887 const int64& session_count = it.second;
888 Value users_json(kObjectType);
889 Value user_name(name, document->GetAllocator());
890 users_json.AddMember("user", user_name, document->GetAllocator());
891 users_json.AddMember("session_count", session_count, document->GetAllocator());
892 users.PushBack(users_json, document->GetAllocator());
893 }
894 }
895 sort(users.Begin(), users.End(), SessionCountComparer);
896 document->AddMember("users", users, document->GetAllocator());
897}
898
899void ImpalaHttpHandler::FillClientHostsInfo(
900 Document* document, const ThriftServer::ConnectionContextList& connection_contexts) {

Callers

nothing calls this directly

Calls 5

sortFunction · 0.85
PushBackMethod · 0.80
AddMemberMethod · 0.45
BeginMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected