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

Method WaitForCompletionExecState

be/src/service/client-request-state.cc:2101–2113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2099}
2100
2101void ClientRequestState::WaitForCompletionExecState() {
2102 if (query_options().long_polling_time_ms <= 0) return;
2103 int64_t timeout_us = query_options().long_polling_time_ms * MICROS_PER_MILLI;
2104 unique_lock<mutex> l(exec_state_lock_);
2105 timespec deadline;
2106 TimeFromNowMicros(timeout_us, &deadline);
2107 bool timed_out = false;
2108 while (exec_state() != ExecState::FINISHED &&
2109 exec_state() != ExecState::ERROR &&
2110 !timed_out) {
2111 timed_out = !exec_state_cv_.WaitUntil(l, deadline);
2112 }
2113}
2114
2115TOperationState::type ClientRequestState::TOperationState() const {
2116 switch (exec_state()) {

Callers 2

GetOperationStatusMethod · 0.80
get_stateMethod · 0.80

Calls 2

TimeFromNowMicrosFunction · 0.85
WaitUntilMethod · 0.45

Tested by

no test coverage detected