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

Method RegisterQuery

be/src/service/impala-server.cc:1520–1539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1518}
1519
1520Status ImpalaServer::RegisterQuery(const TUniqueId& query_id,
1521 const shared_ptr<SessionState>& session_state, QueryHandle* query_handle) {
1522 lock_guard<mutex> l2(session_state->lock);
1523 // The session wasn't expired at the time it was checked out and it isn't allowed to
1524 // expire while checked out, so it must not be expired.
1525 DCHECK_GT(session_state->ref_count, 0);
1526 DCHECK(!session_state->expired);
1527 // The session may have been closed after it was checked out.
1528 if (session_state->closed) {
1529 VLOG(1) << "RegisterQuery(): session has been closed, ignoring query.";
1530 return Status::Expected("Session has been closed, ignoring query.");
1531 }
1532 DCHECK_EQ(this, ExecEnv::GetInstance()->impala_server());
1533 RETURN_IF_ERROR(query_driver_map_.Add(query_id, query_handle->query_driver()));
1534 // Metric is decremented in UnregisterQuery().
1535 ImpaladMetrics::NUM_QUERIES_REGISTERED->Increment(1L);
1536 VLOG_QUERY << "Registered query query_id=" << PrintId(query_id) << " session_id="
1537 << PrintId(session_state->session_id);
1538 return Status::OK();
1539}
1540
1541static inline int32_t GetIdleTimeout(const TQueryOptions& query_options) {
1542 int32_t idle_timeout_s = query_options.query_timeout_s;

Callers 1

RetryQueryFromThreadMethod · 0.80

Calls 5

PrintIdFunction · 0.85
OKFunction · 0.85
impala_serverMethod · 0.45
AddMethod · 0.45
IncrementMethod · 0.45

Tested by

no test coverage detected