MCPcopy Create free account
hub / github.com/apache/impala / GetPartialCatalogObject

Method GetPartialCatalogObject

be/src/exec/catalog-op-executor.cc:392–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392Status CatalogOpExecutor::GetPartialCatalogObject(
393 const TGetPartialCatalogObjectRequest& req,
394 TGetPartialCatalogObjectResponse* resp) {
395 DCHECK(FLAGS_use_local_catalog || TestInfo::is_test());
396 if (FLAGS_inject_latency_before_catalog_fetch_ms > 0) {
397 SleepForMs(FLAGS_inject_latency_before_catalog_fetch_ms);
398 }
399 // Non-table requests are lightweight requests that won't be blocked by table loading
400 // or table locks. Note that when loading table list of a db, the type is DB.
401 auto client_cache_ptr = (req.object_desc.type == TCatalogObjectType::TABLE) ?
402 env_->catalogd_client_cache() : env_->catalogd_lightweight_req_client_cache();
403 int attempt = 0; // Used for debug action only.
404 CatalogServiceConnection::RpcStatus rpc_status =
405 CatalogServiceConnection::DoRpcWithRetry(client_cache_ptr,
406 *ExecEnv::GetInstance()->GetCatalogdAddress().get(),
407 &CatalogServiceClientWrapper::GetPartialCatalogObject, req,
408 FLAGS_catalog_client_connection_num_retries,
409 FLAGS_catalog_client_rpc_retry_interval_ms,
410 [&attempt]() { return CatalogRpcDebugFn(&attempt); }, resp);
411 RETURN_IF_ERROR(rpc_status.status);
412 if (FLAGS_inject_latency_after_catalog_fetch_ms > 0) {
413 SleepForMs(FLAGS_inject_latency_after_catalog_fetch_ms);
414 }
415 if (FLAGS_inject_failure_ratio_in_catalog_fetch > 0
416 && rand() < FLAGS_inject_failure_ratio_in_catalog_fetch * (RAND_MAX + 1L)) {
417 resp->lookup_status = CatalogLookupStatus::TABLE_NOT_LOADED;
418 }
419 return Status::OK();
420}
421
422
423Status CatalogOpExecutor::PrioritizeLoad(const TPrioritizeLoadRequest& req,

Callers

nothing calls this directly

Calls 6

CatalogRpcDebugFnFunction · 0.85
OKFunction · 0.85
catalogd_client_cacheMethod · 0.80
GetCatalogdAddressMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected