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

Method ExecFInstance

be/src/runtime/query-state.cc:1013–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013void QueryState::ExecFInstance(FragmentInstanceState* fis) {
1014 ScopedThreadContext debugctx(GetThreadDebugInfo(), fis->query_id(), fis->instance_id());
1015
1016 ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS_IN_FLIGHT->Increment(1L);
1017 ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS->Increment(1L);
1018 VLOG_QUERY << "Executing instance. instance_id=" << PrintId(fis->instance_id())
1019 << " fragment_idx=" << fis->instance_ctx().fragment_idx
1020 << " per_fragment_instance_idx="
1021 << fis->instance_ctx().per_fragment_instance_idx
1022 << " coord_state_idx=" << exec_rpc_params_.coord_state_idx()
1023 << " #in-flight="
1024 << ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS_IN_FLIGHT->GetValue();
1025 Status status = fis->Exec();
1026 ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS_IN_FLIGHT->Increment(-1L);
1027 VLOG_QUERY << "Instance completed. instance_id=" << PrintId(fis->instance_id())
1028 << " #in-flight="
1029 << ImpaladMetrics::IMPALA_SERVER_NUM_FRAGMENTS_IN_FLIGHT->GetValue()
1030 << " status=" << status;
1031
1032 // Don't cancel other fragments here as the final report for "fis" may not have been
1033 // sent yet. Cancellation will happen in ReportExecStatus() after sending the final
1034 // report to the coordinator. Otherwise, the coordinator fragment may mark the status
1035 // of this backend as "CANCELLED", masking the original error.
1036
1037 // decrement refcount taken in StartFInstances()
1038 ReleaseBackendResourceRefcount();
1039 // decrement refcount taken in StartFInstances()
1040 ExecEnv::GetInstance()->query_exec_mgr()->ReleaseQueryState(this);
1041}
1042
1043void QueryState::Cancel() {
1044 VLOG_QUERY << "Cancel: query_id=" << PrintId(query_id());

Callers 1

StartFInstancesMethod · 0.95

Calls 9

GetThreadDebugInfoFunction · 0.85
PrintIdFunction · 0.85
instance_idMethod · 0.80
ReleaseQueryStateMethod · 0.80
query_exec_mgrMethod · 0.80
query_idMethod · 0.45
IncrementMethod · 0.45
GetValueMethod · 0.45
ExecMethod · 0.45

Tested by

no test coverage detected