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

Method CloseSession

be/src/service/internal-server.cc:80–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78} // ImpalaServer::OpenSession
79
80bool ImpalaServer::CloseSession(const TUniqueId& session_id) {
81 {
82 lock_guard<mutex> l(session_state_map_lock_);
83
84 auto iter = session_state_map_.find(session_id);
85 if (iter == session_state_map_.end()) {
86 return false;
87 }
88
89 MarkSessionInactive(iter->second);
90 }
91
92 {
93 lock_guard<mutex> l(internal_server_connections_lock_, adopt_lock);
94 internal_server_connections_lock_.lock();
95
96 const auto iter = internal_server_connections_.find(session_id);
97 if (iter != internal_server_connections_.end()) {
98 internal_server_connections_lock_.unlock();
99 ConnectionEnd(*iter->second.get());
100 internal_server_connections_lock_.lock();
101 internal_server_connections_.erase(iter);
102 }
103 }
104
105 return true;
106} // ImpalaServer::CloseSession
107
108Status ImpalaServer::ExecuteIgnoreResults(const string& user_name, const string& sql,
109 const QueryOptionMap& query_opts, const bool persist_in_db, TUniqueId* query_id) {

Calls 6

eraseMethod · 0.80
getMethod · 0.65
findMethod · 0.45
endMethod · 0.45
lockMethod · 0.45
unlockMethod · 0.45

Tested by 13

executeTestQueryMethod · 0.36
add_session_helperFunction · 0.36
ScopedSessionFunction · 0.36
test_close_sessionMethod · 0.36
test_close_connectionMethod · 0.36
test_require_userMethod · 0.36
test_hs2_getcolumsMethod · 0.36