Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <catalog-op-executor.h>
Public Member Functions | |
CatalogOpExecutor (ExecEnv *env, Frontend *fe, RuntimeProfile *profile) | |
Status | Exec (const TCatalogOpRequest &catalog_op) |
Executes the given catalog operation against the catalog server. More... | |
Status | GetCatalogObject (const TCatalogObject &object_desc, TCatalogObject *result) |
Status | ExecComputeStats (const TComputeStatsParams &compute_stats_params, const apache::hive::service::cli::thrift::TTableSchema &tbl_stats_schema, const apache::hive::service::cli::thrift::TRowSet &tbl_stats_data, const apache::hive::service::cli::thrift::TTableSchema &col_stats_schema, const apache::hive::service::cli::thrift::TRowSet &col_stats_data) |
Status | PrioritizeLoad (const TPrioritizeLoadRequest &req, TPrioritizeLoadResponse *result) |
Status | SentryAdminCheck (const TSentryAdminCheckRequest &re) |
const TDdlExecResponse * | ddl_exec_response () const |
const TCatalogUpdateResult * | update_catalog_result () const |
Private Member Functions | |
void | HandleDropFunction (const TDropFunctionParams &) |
void | HandleDropDataSource (const TDropDataSourceParams &) |
Static Private Member Functions | |
static void | SetTableStats (const apache::hive::service::cli::thrift::TTableSchema &tbl_stats_schema, const apache::hive::service::cli::thrift::TRowSet &tbl_stats_data, const std::vector< TPartitionStats > &existing_part_stats, TAlterTableUpdateStatsParams *params) |
static void | SetColumnStats (const apache::hive::service::cli::thrift::TTableSchema &col_stats_schema, const apache::hive::service::cli::thrift::TRowSet &col_stats_data, TAlterTableUpdateStatsParams *params) |
Private Attributes | |
boost::scoped_ptr < TDdlExecResponse > | exec_response_ |
Response from executing the DDL request, see ddl_exec_response(). More... | |
boost::scoped_ptr < TCatalogUpdateResult > | catalog_update_result_ |
Result of executing a DDL request using the CatalogService. More... | |
ExecEnv * | env_ |
Frontend * | fe_ |
RuntimeProfile * | profile_ |
The CatalogOpExecutor is responsible for executing catalog operations. This includes DDL statements such as CREATE and ALTER as well as statements such as INVALIDATE METADATA. One CatalogOpExecutor is typically created per catalog operation.
Definition at line 34 of file catalog-op-executor.h.
|
inline |
Definition at line 36 of file catalog-op-executor.h.
|
inline |
Set in Exec(), returns a pointer to the TDdlExecResponse of the DDL execution. If called before Exec(), this will return NULL. Only set if the TCatalogOpType is DDL.
Definition at line 70 of file catalog-op-executor.h.
References exec_response_.
Status CatalogOpExecutor::Exec | ( | const TCatalogOpRequest & | catalog_op | ) |
Executes the given catalog operation against the catalog server.
Definition at line 42 of file catalog-op-executor.cc.
References ADD_TIMER, impala::MakeNetworkAddress(), impala::Status::ok(), RETURN_IF_ERROR, and SCOPED_TIMER.
Status CatalogOpExecutor::ExecComputeStats | ( | const TComputeStatsParams & | compute_stats_params, |
const apache::hive::service::cli::thrift::TTableSchema & | tbl_stats_schema, | ||
const apache::hive::service::cli::thrift::TRowSet & | tbl_stats_data, | ||
const apache::hive::service::cli::thrift::TTableSchema & | col_stats_schema, | ||
const apache::hive::service::cli::thrift::TRowSet & | col_stats_data | ||
) |
Translates the given compute stats params and its child-query results into a new table alteration request for updating the stats metadata, and executes the alteration via Exec();
Definition at line 85 of file catalog-op-executor.cc.
References ADD_TIMER, impala::Exec(), impala::FinalizePartitionedColumnStats(), impala::Status::OK, RETURN_IF_ERROR, and SCOPED_TIMER.
Status CatalogOpExecutor::GetCatalogObject | ( | const TCatalogObject & | object_desc, |
TCatalogObject * | result | ||
) |
Fetches the metadata for the specific TCatalogObject descriptor from the catalog server. If the catalog server does not have the object cached, its metadata will be loaded.
Definition at line 245 of file catalog-op-executor.cc.
References impala::MakeNetworkAddress(), impala::Status::OK, and RETURN_IF_ERROR.
|
private |
Definition at line 161 of file catalog-op-executor.cc.
References impala::LibCache::instance(), impala::Status::ok(), impala::LibCache::RemoveEntry(), and VLOG_QUERY.
|
private |
Handles additional BE work that needs to be done for drop function and data source, in particular, clearing the local library cache for this function.
Definition at line 130 of file catalog-op-executor.cc.
References impala::LibCache::instance(), impala::Status::ok(), impala::LibCache::RemoveEntry(), and VLOG_QUERY.
Status CatalogOpExecutor::PrioritizeLoad | ( | const TPrioritizeLoadRequest & | req, |
TPrioritizeLoadResponse * | result | ||
) |
Makes an RPC to the CatalogServer to prioritize the loading of the catalog objects specified in the TPrioritizeLoadRequest. Returns OK if the RPC was successful, otherwise a bad status will be returned.
Definition at line 263 of file catalog-op-executor.cc.
References impala::MakeNetworkAddress(), impala::Status::OK, and RETURN_IF_ERROR.
Referenced by Java_com_cloudera_impala_service_FeSupport_NativePrioritizeLoad().
Status CatalogOpExecutor::SentryAdminCheck | ( | const TSentryAdminCheckRequest & | re | ) |
Makes an RPC to the CatalogServer to verify whether the specified user has privileges to access the Sentry Policy Service. Returns OK if the user has privileges or a bad status if the user does not have privileges (or if there was an error).
Definition at line 274 of file catalog-op-executor.cc.
References impala::MakeNetworkAddress(), and RETURN_IF_ERROR.
|
staticprivate |
Definition at line 224 of file catalog-op-executor.cc.
|
staticprivate |
Helper functions used in ExecComputeStats() for setting the thrift structs in params for the table/column stats based on the results of the corresponding child query.
Definition at line 190 of file catalog-op-executor.cc.
References impala::PrintTColumnValue().
|
inline |
Set in Exec(), for operations that execute using the CatalogServer. Returns a pointer to the TCatalogUpdateResult of the operation. This includes details on the Status of the operation, the CatalogService ID that processed the request, and the minimum catalog version that will reflect this change. If called before Exec(), this will return NULL.
Definition at line 77 of file catalog-op-executor.h.
References catalog_update_result_.
|
private |
Result of executing a DDL request using the CatalogService.
Definition at line 98 of file catalog-op-executor.h.
Referenced by update_catalog_result().
|
private |
Definition at line 100 of file catalog-op-executor.h.
|
private |
Response from executing the DDL request, see ddl_exec_response().
Definition at line 95 of file catalog-op-executor.h.
Referenced by ddl_exec_response().
|
private |
Definition at line 101 of file catalog-op-executor.h.
|
private |
Definition at line 102 of file catalog-op-executor.h.