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

#include <request-pool-service.h>

Collaboration diagram for impala::RequestPoolService:

Public Member Functions

 RequestPoolService (MetricGroup *metrics)
 
Status ResolveRequestPool (const std::string &requested_pool_name, const std::string &user, TResolveRequestPoolResult *resolved_pool)
 
Status GetPoolConfig (const std::string &pool_name, TPoolConfigResult *pool_config)
 

Private Attributes

MetricGroupmetrics_
 Metrics subsystem access. More...
 
StatsMetric< double > * resolve_pool_ms_metric_
 Metric measuring the time ResolveRequestPool() takes, in milliseconds. More...
 
bool default_pool_only_
 
int64_t default_pool_mem_limit_
 
jclass request_pool_service_class_
 
jobject request_pool_service_
 Instance of com.cloudera.impala.util.RequestPoolService. More...
 
jmethodID resolve_request_pool_id_
 
jmethodID get_pool_config_id_
 
jmethodID ctor_
 

Detailed Description

Used by the SimpleScheduler and AdmissionController to resolve users to pools and to get per-pool configurations for admission control. If fair scheduler allocation and Llama configuration files are available, then they are used via the Java-side RequestPoolService class. Otherwise, a default pool is always returned with pool limits configurable via gflags. A single instance of RequestPoolService is created and it lives the lifetime of the process.

Definition at line 32 of file request-pool-service.h.

Constructor & Destructor Documentation

RequestPoolService::RequestPoolService ( MetricGroup metrics)

Member Function Documentation

Status RequestPoolService::GetPoolConfig ( const std::string &  pool_name,
TPoolConfigResult *  pool_config 
)

Gets the pool configuration values for the specified pool. If default_pool_only_ is true, then the returned values are always the default pool values, i.e. pool is ignored.

Definition at line 152 of file request-pool-service.cc.

References impala::JniUtil::CallJniMethod(), default_pool_mem_limit_, default_pool_only_, get_pool_config_id_, impala::Status::OK, request_pool_service_, and RETURN_IF_ERROR.

Referenced by impala::AdmissionController::AdmitQuery().

Status RequestPoolService::ResolveRequestPool ( const std::string &  requested_pool_name,
const std::string &  user,
TResolveRequestPoolResult *  resolved_pool 
)

Resolves the user and user-provided pool name to the pool returned by the placement policy and whether or not the user is authorized. If default_pool_only_ is true, then this will always return the default pool and will always be authorized, i.e. pool and user are ignored.

Definition at line 133 of file request-pool-service.cc.

References impala::JniUtil::CallJniMethod(), DEFAULT_POOL_NAME, default_pool_only_, impala::MonotonicMillis(), impala::Status::OK, request_pool_service_, resolve_pool_ms_metric_, resolve_request_pool_id_, and impala::StatsMetric< T >::Update().

Member Data Documentation

jmethodID impala::RequestPoolService::ctor_
private

Definition at line 77 of file request-pool-service.h.

Referenced by RequestPoolService().

int64_t impala::RequestPoolService::default_pool_mem_limit_
private

Mem limit (in bytes) of the default pool. Only used if default_pool_only_ is true. Set in the constructor by parsing the 'default_pool_mem_limit' gflag using ParseUtil::ParseMemSpec().

Definition at line 68 of file request-pool-service.h.

Referenced by GetPoolConfig(), and RequestPoolService().

bool impala::RequestPoolService::default_pool_only_
private

True if the pool configuration files are not provided. ResolveRequestPool() will always return the default-pool and GetPoolConfig() will always return the limits specified by the default pool gflags, which are unlimited unless specified via the 'default_pool_max_XXX' flags (see the flag definitions in request-pool-service.cc).

Definition at line 63 of file request-pool-service.h.

Referenced by GetPoolConfig(), RequestPoolService(), and ResolveRequestPool().

jmethodID impala::RequestPoolService::get_pool_config_id_
private

Definition at line 76 of file request-pool-service.h.

Referenced by GetPoolConfig(), and RequestPoolService().

MetricGroup* impala::RequestPoolService::metrics_
private

Metrics subsystem access.

Definition at line 53 of file request-pool-service.h.

Referenced by RequestPoolService().

jobject impala::RequestPoolService::request_pool_service_
private
jclass impala::RequestPoolService::request_pool_service_class_
private

The following members are not initialized if default_pool_only_ is true. Descriptor of Java RequestPoolService class itself, used to create a new instance.

Definition at line 72 of file request-pool-service.h.

Referenced by RequestPoolService().

StatsMetric<double>* impala::RequestPoolService::resolve_pool_ms_metric_
private

Metric measuring the time ResolveRequestPool() takes, in milliseconds.

Definition at line 56 of file request-pool-service.h.

Referenced by RequestPoolService(), and ResolveRequestPool().

jmethodID impala::RequestPoolService::resolve_request_pool_id_
private

Definition at line 75 of file request-pool-service.h.

Referenced by RequestPoolService(), and ResolveRequestPool().


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