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

Method CatalogObjectsHandler

be/src/service/impala-http-handler.cc:1109–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1107}
1108
1109void ImpalaHttpHandler::CatalogObjectsHandler(const Webserver::WebRequest& req,
1110 Document* document) {
1111 DCHECK(!FLAGS_use_local_catalog);
1112 const auto& args = req.parsed_args;
1113 Webserver::ArgumentMap::const_iterator object_type_arg = args.find("object_type");
1114 Webserver::ArgumentMap::const_iterator object_name_arg = args.find("object_name");
1115 if (object_type_arg != args.end() && object_name_arg != args.end()) {
1116 TCatalogObjectType::type object_type =
1117 TCatalogObjectTypeFromName(object_type_arg->second);
1118
1119 // Get the object type and name from the topic entry key
1120 TCatalogObject request;
1121 TCatalogObject result;
1122 Status status = TCatalogObjectFromObjectName(object_type, object_name_arg->second, &request);
1123 if (status.ok()) {
1124 // Get the object and dump its contents.
1125 status = server_->exec_env_->frontend()->GetCatalogObject(request, &result);
1126 }
1127 if (status.ok()) {
1128 Value debug_string(ThriftDebugString(result), document->GetAllocator());
1129 document->AddMember("thrift_string", debug_string, document->GetAllocator());
1130 } else {
1131 Value error(status.GetDetail(), document->GetAllocator());
1132 document->AddMember("error", error, document->GetAllocator());
1133 }
1134 } else {
1135 Value error("Please specify values for the object_type and object_name parameters.",
1136 document->GetAllocator());
1137 document->AddMember("error", error, document->GetAllocator());
1138 }
1139}
1140
1141namespace {
1142

Callers

nothing calls this directly

Calls 10

ThriftDebugStringFunction · 0.85
GetDetailMethod · 0.80
findMethod · 0.45
endMethod · 0.45
okMethod · 0.45
GetCatalogObjectMethod · 0.45
frontendMethod · 0.45
AddMemberMethod · 0.45

Tested by

no test coverage detected