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

Method SetNonErrorTerminalState

be/src/runtime/coordinator.cc:819–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817}
818
819Status Coordinator::SetNonErrorTerminalState(const ExecState state) {
820 DCHECK(state == ExecState::RETURNED_RESULTS || state == ExecState::CANCELLED);
821 Status ret_status;
822 {
823 lock_guard<SpinLock> l(exec_state_lock_);
824 // May have already entered a terminal state, in which case nothing to do.
825 if (!IsExecuting()) return exec_status_;
826 DCHECK(exec_status_.ok()) << exec_status_;
827 exec_state_.Store(state);
828 if (state == ExecState::CANCELLED) exec_status_ = Status::CANCELLED;
829 ret_status = exec_status_;
830 }
831 VLOG_QUERY << Substitute("ExecState: query id=$0 execution $1", PrintId(query_id()),
832 state == ExecState::CANCELLED ? "cancelled" : "completed");
833 HandleExecStateTransition(ExecState::EXECUTING, state);
834 return ret_status;
835}
836
837Status Coordinator::UpdateExecState(const Status& status,
838 const TUniqueId* failed_finst, const string& instance_hostname) {

Callers

nothing calls this directly

Calls 4

SubstituteFunction · 0.85
PrintIdFunction · 0.85
okMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected