Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <query-resource-mgr.h>
Public Member Functions | |
ResourceResolver (const boost::unordered_set< TNetworkAddress > &unique_hosts) | |
void | GetResourceHostport (const TNetworkAddress &src, TNetworkAddress *dst) |
Private Member Functions | |
void | CreateLocalLlamaNodeMapping (const boost::unordered_set< TNetworkAddress > &unique_hosts) |
Private Attributes | |
boost::unordered_map < TNetworkAddress, TNetworkAddress > | impalad_to_dn_ |
boost::unordered_map < TNetworkAddress, TNetworkAddress > | dn_to_impalad_ |
Utility class to map hosts to the Llama-registered resource-holding hosts (i.e. datanodes).
Definition at line 40 of file query-resource-mgr.h.
ResourceResolver::ResourceResolver | ( | const boost::unordered_set< TNetworkAddress > & | unique_hosts | ) |
Definition at line 43 of file query-resource-mgr.cc.
References impala::ExecEnv::GetInstance().
|
private |
Called only in pseudo-distributed setups (i.e. testing only) to populate impalad_to_dn_ and dn_to_impalad_
Definition at line 59 of file query-resource-mgr.cc.
References impala::ExecEnv::GetInstance(), impala::ResourceBroker::llama_nodes(), impala::MakeNetworkAddress(), and impala::ExecEnv::resource_broker().
void ResourceResolver::GetResourceHostport | ( | const TNetworkAddress & | src, |
TNetworkAddress * | dst | ||
) |
Translates src into a network address suitable for identifying resources across interactions with the Llama. The MiniLlama expects resources to be requested on IP:port addresses of Hadoop DNs, whereas the regular Llama only deals with the hostnames of Yarn NMs. For MiniLlama setups this translation uses the impalad_to_dn_ mapping to populate dest. When using the regular Llama, this translation sets a fixed port of 0 in dest because the Llama strips away the port of resource locations.
Definition at line 49 of file query-resource-mgr.cc.
References impala::ExecEnv::GetInstance().
Referenced by impala::QueryResourceMgr::CreateExpansionRequest(), and impala::QuerySchedule::ValidateReservation().
|
private |
Definition at line 59 of file query-resource-mgr.h.
|
private |
Impala mini clusters using the Mini Llama require translating the impalad hostports to Hadoop DN hostports registered with the Llama during resource requests (and then in reverse for translating granted resources to impalads). These maps form a bi-directional hostport mapping Hadoop DN <-> impalad.
Definition at line 58 of file query-resource-mgr.h.