Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
Execution state of a single plan fragment. More...
#include <fragment-exec-state.h>
Public Member Functions | |
FragmentExecState (const TPlanFragmentInstanceCtx &fragment_instance_ctx, ExecEnv *exec_env) | |
~FragmentExecState () | |
Status | Cancel () |
Status | Prepare (const TExecPlanFragmentParams &exec_params) |
Call Prepare() and create and initialize data sink. More... | |
void | Exec () |
Main loop of plan fragment execution. Blocks until execution finishes. More... | |
const TUniqueId & | query_id () const |
const TUniqueId & | fragment_instance_id () const |
const TNetworkAddress & | coord_address () const |
void | set_exec_thread (Thread *exec_thread) |
Set the execution thread, taking ownership of the object. More... | |
Private Member Functions | |
void | ReportStatusCb (const Status &status, RuntimeProfile *profile, bool done) |
Status | UpdateStatus (const Status &status) |
Private Attributes | |
TPlanFragmentInstanceCtx | fragment_instance_ctx_ |
PlanFragmentExecutor | executor_ |
ImpalaInternalServiceClientCache * | client_cache_ |
TExecPlanFragmentParams | exec_params_ |
boost::scoped_ptr< Thread > | exec_thread_ |
the thread executing this plan fragment More... | |
boost::mutex | status_lock_ |
protects exec_status_ More... | |
Status | exec_status_ |
Execution state of a single plan fragment.
Definition at line 29 of file fragment-exec-state.h.
|
inline |
Definition at line 31 of file fragment-exec-state.h.
|
inline |
Calling the d'tor releases all memory and closes all data streams held by executor_.
Definition at line 42 of file fragment-exec-state.h.
Status FragmentMgr::FragmentExecState::Cancel | ( | ) |
Returns current execution status, if there was an error. Otherwise cancels the fragment and returns OK.
Definition at line 34 of file fragment-exec-state.cc.
References impala::executor_, impala::OK, and RETURN_IF_ERROR.
|
inline |
Definition at line 62 of file fragment-exec-state.h.
References fragment_instance_ctx_.
void FragmentMgr::FragmentExecState::Exec | ( | ) |
Main loop of plan fragment execution. Blocks until execution finishes.
Definition at line 48 of file fragment-exec-state.cc.
References impala::ImpaladQueryExecutor::Close(), and impala::executor_.
Referenced by impala::FragmentMgr::FragmentExecThread().
|
inline |
Definition at line 58 of file fragment-exec-state.h.
References fragment_instance_ctx_.
Referenced by impala::FragmentMgr::FragmentExecThread().
Status FragmentMgr::FragmentExecState::Prepare | ( | const TExecPlanFragmentParams & | exec_params | ) |
Call Prepare() and create and initialize data sink.
Definition at line 41 of file fragment-exec-state.cc.
References impala::executor_, impala::OK, and RETURN_IF_ERROR.
|
inline |
Definition at line 54 of file fragment-exec-state.h.
References fragment_instance_ctx_.
|
private |
Callback for executor; updates exec_status_ if 'status' indicates an error or if there was a thrift error.
Definition at line 58 of file fragment-exec-state.cc.
References impala::ClientConnection< T >::DoRpc(), impala::executor_, impala::RuntimeState::GetUnreportedErrors(), impala::RuntimeState::hdfs_files_to_move(), impala::Status::ok(), impala::RuntimeState::per_partition_status(), impala::runtime_state(), impala::Status::SetTStatus(), impala::RuntimeProfile::ToThrift(), and impala::UpdateStatus().
|
inline |
Set the execution thread, taking ownership of the object.
Definition at line 67 of file fragment-exec-state.h.
References exec_thread_.
Update exec_status_ w/ status, if the former isn't already an error. Returns current exec_status_.
Definition at line 28 of file fragment-exec-state.cc.
References impala::Status::ok().
|
private |
Definition at line 72 of file fragment-exec-state.h.
|
private |
Definition at line 73 of file fragment-exec-state.h.
|
private |
set in ReportStatusCb(); if set to anything other than OK, execution has terminated w/ an error
Definition at line 83 of file fragment-exec-state.h.
|
private |
the thread executing this plan fragment
Definition at line 76 of file fragment-exec-state.h.
Referenced by set_exec_thread().
|
private |
Definition at line 71 of file fragment-exec-state.h.
|
private |
Definition at line 70 of file fragment-exec-state.h.
Referenced by coord_address(), fragment_instance_id(), and query_id().
|
private |
protects exec_status_
Definition at line 79 of file fragment-exec-state.h.