Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::ResourceResolver Class Reference

#include <query-resource-mgr.h>

Collaboration diagram for impala::ResourceResolver:

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

ResourceResolver::ResourceResolver ( const boost::unordered_set< TNetworkAddress > &  unique_hosts)

Definition at line 43 of file query-resource-mgr.cc.

References impala::ExecEnv::GetInstance().

Member Function Documentation

void ResourceResolver::CreateLocalLlamaNodeMapping ( const boost::unordered_set< TNetworkAddress > &  unique_hosts)
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().

Member Data Documentation

boost::unordered_map<TNetworkAddress, TNetworkAddress> impala::ResourceResolver::dn_to_impalad_
private

Definition at line 59 of file query-resource-mgr.h.

boost::unordered_map<TNetworkAddress, TNetworkAddress> impala::ResourceResolver::impalad_to_dn_
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.


The documentation for this class was generated from the following files: