Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <exec-env.h>
Static Public Member Functions | |
static ExecEnv * | GetInstance () |
Private Member Functions | |
void | InitRm () |
Initialise cgroups manager, detect test RM environment and init resource broker. More... | |
Private Attributes | |
TimezoneDatabase | tz_database_ |
bool | is_fe_tests_ |
TNetworkAddress | backend_address_ |
Address of the Impala backend server instance. More... | |
bool | is_pseudo_distributed_llama_ |
Static Private Attributes | |
static ExecEnv * | exec_env_ = NULL |
Execution environment for queries/plan fragments. Contains all required global structures, and handles to singleton services. Clients must call StartServices exactly once to properly initialise service state.
Definition at line 53 of file exec-env.h.
impala::ExecEnv::ExecEnv | ( | ) |
Definition at line 132 of file exec-env.cc.
References backend_address_, exec_env_, InitRm(), impala::MakeNetworkAddress(), metrics_, request_pool_service_, resource_broker_, scheduler_, statestore_subscriber_, impala::TNetworkAddressToString(), and webserver_.
impala::ExecEnv::ExecEnv | ( | const std::string & | hostname, |
int | backend_port, | ||
int | subscriber_port, | ||
int | webserver_port, | ||
const std::string & | statestore_host, | ||
int | statestore_port | ||
) |
|
virtual |
Empty destructor because the compiler-generated one requires full declarations for classes in scoped_ptrs.
Definition at line 273 of file exec-env.cc.
|
inline |
Definition at line 99 of file exec-env.h.
References backend_address_.
Referenced by impala::ImpalaServer::QueryExecState::QueryExecState().
|
inline |
Definition at line 79 of file exec-env.h.
References catalogd_client_cache_.
Referenced by impala::RuntimeState::catalogd_client_cache(), and impala::ImpalaServer::QueryExecState::UpdateCatalog().
|
inline |
Definition at line 88 of file exec-env.h.
References cgroups_mgr_.
Referenced by impala::QueryResourceMgr::AcquireVcoreResources(), impala::PlanFragmentExecutor::Close(), impala::BlockingJoinNode::Open(), impala::PlanFragmentExecutor::Prepare(), and impala::HdfsScanNode::Prepare().
|
inline |
Definition at line 83 of file exec-env.h.
References disk_io_mgr_.
Referenced by impala::RuntimeState::io_mgr().
|
inline |
Definition at line 91 of file exec-env.h.
References frontend_.
Referenced by impala::ImpalaServer::CatalogObjectsUrlCallback(), impala::ImpalaServer::CatalogUpdateCallback(), impala::ImpalaServer::CatalogUrlCallback(), impala::ImpalaServer::ExecuteInternal(), impala::ImpalaServer::ExecuteMetadataOp(), impala::ImpalaServer::explain(), impala::ImpalaServer::HadoopVarzUrlCallback(), impala::ImpalaServer::ImpalaServer(), impala::ImpalaServer::ProcessCatalogUpdateResult(), and impala::ImpalaServer::UpdateCatalogMetrics().
|
inlinestatic |
Returns the first created exec env instance. In a normal impalad, this is the only instance. In test setups with multiple ExecEnv's per process, we return the first instance.
Definition at line 63 of file exec-env.h.
References exec_env_.
Referenced by impala::QueryResourceMgr::AcquireVcoreResources(), impala::ResourceResolver::CreateLocalLlamaNodeMapping(), impala::FragmentMgr::ExecPlanFragment(), impala::MemTracker::ExpandRmReservation(), impala::ResourceResolver::GetResourceHostport(), Java_com_cloudera_impala_service_FeSupport_NativeFeTestInit(), Java_com_cloudera_impala_service_FeSupport_NativeGetStartupOptions(), Java_com_cloudera_impala_service_FeSupport_NativePrioritizeLoad(), MaintenanceThread(), impala::ExchangeNode::Prepare(), impala::ResourceResolver::ResourceResolver(), and impala::QueryResourceMgr::Shutdown().
|
inline |
Definition at line 89 of file exec-env.h.
References hdfs_op_thread_pool_.
|
inline |
Definition at line 82 of file exec-env.h.
References htable_factory_.
Referenced by impala::RuntimeState::htable_factory().
|
inline |
Definition at line 90 of file exec-env.h.
References impala_server_.
Referenced by Java_com_cloudera_impala_service_FeSupport_NativeGetStartupOptions().
|
inline |
Definition at line 76 of file exec-env.h.
References impalad_client_cache_.
Referenced by impala::RuntimeState::impalad_client_cache(), impala::ImpalaServer::MembershipCallback(), and impala::DataStreamTest::TearDown().
Status impala::ExecEnv::InitForFeTests | ( | ) |
Initializes the exec env for running FE tests.
Definition at line 276 of file exec-env.cc.
References is_fe_tests_, mem_tracker_, and impala::Status::OK.
Referenced by impala::DataStreamTest::DataStreamTest(), and Java_com_cloudera_impala_service_FeSupport_NativeFeTestInit().
|
private |
Initialise cgroups manager, detect test RM environment and init resource broker.
Definition at line 223 of file exec-env.cc.
References cgroups_mgr_, frontend_, is_pseudo_distributed_llama_, impala::MakeNetworkAddress(), metrics_, PSEUDO_DISTRIBUTED_CONFIG_KEY, and resource_broker_.
Referenced by ExecEnv().
|
inline |
Returns true if this environment was created from the FE tests. This makes the environment special since the JVM is started first and libraries are loaded differently.
Definition at line 110 of file exec-env.h.
References is_fe_tests_.
|
inline |
Returns true if the Llama in use is pseudo-distributed, used for development purposes. The pseudo-distributed version has special requirements for specifying resource locations.
Definition at line 115 of file exec-env.h.
References is_pseudo_distributed_llama_.
|
inline |
Definition at line 85 of file exec-env.h.
References metrics_.
Referenced by impala::CreateImpalaServer(), impala::ImpalaServer::ImpalaServer(), and main().
|
inline |
Definition at line 86 of file exec-env.h.
References mem_tracker_.
Referenced by impala::RuntimeState::InitMemTrackers(), MaintenanceThread(), and impala::RuntimeState::SetMemLimitExceeded().
|
inline |
Definition at line 95 of file exec-env.h.
References resource_broker_.
Referenced by impala::QueryResourceMgr::AcquireVcoreResources(), impala::ResourceResolver::CreateLocalLlamaNodeMapping(), impala::ImpalaServer::QueryExecState::ExecQueryOrDmlRequest(), impala::MemTracker::ExpandRmReservation(), impala::PlanFragmentExecutor::Prepare(), impala::QueryResourceMgr::Shutdown(), and impala::PlanFragmentExecutor::~PlanFragmentExecutor().
|
inline |
Definition at line 96 of file exec-env.h.
References scheduler_.
Referenced by impala::ImpalaServer::QueryExecState::Done(), and impala::ImpalaServer::QueryExecState::ExecQueryOrDmlRequest().
|
inline |
Definition at line 93 of file exec-env.h.
References enable_webserver_.
|
inline |
Definition at line 69 of file exec-env.h.
References impala_server_.
Referenced by impala::ImpalaServer::ImpalaServer().
|
virtual |
Starts any dependent services in their correct order.
Definition at line 282 of file exec-env.cc.
References impala::AddDefaultUrlCallbacks(), impala::Status::AddDetail(), catalogd_client_cache_, cgroups_mgr_, impala::MemInfo::commit_limit(), impala::DiskIoMgr::DEFAULT_QUEUE_CAPACITY, disk_io_mgr_, enable_webserver_, impalad_client_cache_, mem_tracker_, metrics_, impala::Status::OK, impala::Status::ok(), impala::ParseUtil::ParseMemSpec(), impala::TcmallocMetric::PHYSICAL_BYTES_RESERVED, impala::MemInfo::physical_mem(), impala::PrettyPrinter::Print(), impala::RegisterMemoryMetrics(), resource_broker_, RETURN_IF_ERROR, scheduler_, statestore_subscriber_, impala::MemInfo::vm_overcommit(), and webserver_.
Referenced by main().
|
inline |
Definition at line 71 of file exec-env.h.
References statestore_subscriber_.
|
inline |
Definition at line 75 of file exec-env.h.
References stream_mgr_.
Referenced by impala::ExchangeNode::Prepare(), impala::RuntimeState::stream_mgr(), and impala::ImpalaServer::TransmitData().
|
inline |
Definition at line 97 of file exec-env.h.
References statestore_subscriber_.
Referenced by impala::ImpalaServer::ImpalaServer().
|
inline |
Definition at line 87 of file exec-env.h.
References thread_mgr_.
Referenced by impala::PlanFragmentExecutor::Close(), and impala::RuntimeState::Init().
|
inline |
Definition at line 84 of file exec-env.h.
References webserver_.
Referenced by impala::ImpalaServer::ImpalaServer(), and main().
|
private |
Address of the Impala backend server instance.
Definition at line 147 of file exec-env.h.
Referenced by backend_address(), and ExecEnv().
|
protected |
Definition at line 124 of file exec-env.h.
Referenced by catalogd_client_cache(), and StartServices().
|
protected |
Definition at line 131 of file exec-env.h.
Referenced by cgroups_mgr(), InitRm(), and StartServices().
|
protected |
Definition at line 126 of file exec-env.h.
Referenced by disk_io_mgr(), and StartServices().
|
protected |
Definition at line 139 of file exec-env.h.
Referenced by set_enable_webserver(), and StartServices().
|
staticprivate |
Definition at line 142 of file exec-env.h.
Referenced by ExecEnv(), and GetInstance().
|
protected |
Definition at line 134 of file exec-env.h.
Referenced by frontend(), and InitRm().
|
protected |
Definition at line 132 of file exec-env.h.
Referenced by hdfs_op_thread_pool().
|
protected |
Definition at line 125 of file exec-env.h.
Referenced by htable_factory().
|
protected |
Not owned by this class.
Definition at line 137 of file exec-env.h.
Referenced by impala_server(), and SetImpalaServer().
|
protected |
Definition at line 123 of file exec-env.h.
Referenced by impalad_client_cache(), and StartServices().
|
private |
Definition at line 144 of file exec-env.h.
Referenced by InitForFeTests(), and is_fe_tests().
|
private |
True if the cluster has set 'yarn.scheduler.include-port-in-node-name' to true, indicating that this cluster is pseudo-distributed. Should not be true in real deployments.
Definition at line 152 of file exec-env.h.
Referenced by InitRm(), and is_pseudo_distributed_llama().
|
protected |
Definition at line 129 of file exec-env.h.
Referenced by InitForFeTests(), process_mem_tracker(), and StartServices().
|
protected |
Definition at line 128 of file exec-env.h.
Referenced by ExecEnv(), InitRm(), metrics(), and StartServices().
|
protected |
Definition at line 133 of file exec-env.h.
Referenced by ExecEnv().
|
protected |
Definition at line 120 of file exec-env.h.
Referenced by ExecEnv(), InitRm(), resource_broker(), and StartServices().
|
protected |
Definition at line 121 of file exec-env.h.
Referenced by ExecEnv(), scheduler(), and StartServices().
|
protected |
Definition at line 122 of file exec-env.h.
Referenced by ExecEnv(), StartServices(), statestore_subscriber(), and subscriber().
|
protected |
Leave protected so that subclasses can override.
Definition at line 119 of file exec-env.h.
Referenced by stream_mgr().
|
protected |
Definition at line 130 of file exec-env.h.
Referenced by thread_mgr().
|
private |
Definition at line 143 of file exec-env.h.
|
protected |
Definition at line 127 of file exec-env.h.
Referenced by ExecEnv(), StartServices(), and webserver().