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

Method AddSessionToConnection

be/src/service/impala-hs2-server.cc:1441–1456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439}
1440
1441void ImpalaServer::AddSessionToConnection(
1442 const TUniqueId& session_id, SessionState* session) {
1443 const TUniqueId& connection_id = ThriftServer::GetThreadConnectionId();
1444 {
1445 lock_guard<mutex> l(connection_to_sessions_map_lock_);
1446 connection_to_sessions_map_[connection_id].insert(session_id);
1447 }
1448
1449 std::lock_guard<std::mutex> session_lock(session->lock);
1450 if (session->connections.empty()) {
1451 // This session was previously disconnected but now has an associated
1452 // connection. It should no longer be considered for the disconnected timeout.
1453 UnregisterSessionTimeout(FLAGS_disconnected_session_timeout);
1454 }
1455 session->connections.insert(connection_id);
1456}
1457
1458void ImpalaServer::PingImpalaHS2Service(TPingImpalaHS2ServiceResp& return_val,
1459 const TPingImpalaHS2ServiceReq& req) {

Callers 1

WithSessionMethod · 0.80

Calls 2

insertMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected