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

Method GetQueryDriver

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

Source from the content-addressed store, hash-verified

1931}
1932
1933shared_ptr<QueryDriver> ImpalaServer::GetQueryDriver(
1934 const TUniqueId& query_id, bool return_unregistered) {
1935 DCHECK_EQ(this, ExecEnv::GetInstance()->impala_server());
1936 ScopedShardedMapRef<shared_ptr<QueryDriver>> map_ref(query_id, &query_driver_map_);
1937 DCHECK(map_ref.get() != nullptr);
1938
1939 auto entry = map_ref->find(query_id);
1940 if (entry == map_ref->end()) return shared_ptr<QueryDriver>();
1941
1942 // This started_unregister() check can race with unregistration. It cannot prevent
1943 // unregistration starting immediately after the value is loaded. This check, however,
1944 // is sufficient to ensure that after a client operation has unregistered the request,
1945 // subsequent operations won't spuriously find the request.
1946 if (!return_unregistered && entry->second->finalized()) {
1947 return shared_ptr<QueryDriver>();
1948 }
1949 return entry->second;
1950}
1951
1952Status ImpalaServer::GetInterruptedStatus(const TUniqueId& query_id) {
1953 lock_guard<mutex> l(interrupted_query_statuses_lock_);

Callers 2

TryQueryRetryMethod · 0.80
RetryQueryFromThreadMethod · 0.80

Calls 5

finalizedMethod · 0.80
getMethod · 0.65
impala_serverMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected