| 966 | } |
| 967 | |
| 968 | Status ImpalaServer::DecompressToProfile(TRuntimeProfileFormat::type format, |
| 969 | const QueryStateRecord& query_record, RuntimeProfileOutput* profile) { |
| 970 | if (format == TRuntimeProfileFormat::BASE64) { |
| 971 | Base64Encode(query_record.compressed_profile, profile->string_output); |
| 972 | } else if (format == TRuntimeProfileFormat::THRIFT) { |
| 973 | RETURN_IF_ERROR(RuntimeProfile::DecompressToThrift( |
| 974 | query_record.compressed_profile, profile->thrift_output)); |
| 975 | } else if (format == TRuntimeProfileFormat::JSON) { |
| 976 | ObjectPool tmp_pool; |
| 977 | RuntimeProfile* tmp_profile; |
| 978 | RETURN_IF_ERROR(RuntimeProfile::DecompressToProfile( |
| 979 | query_record.compressed_profile, &tmp_pool, &tmp_profile)); |
| 980 | tmp_profile->ToJson(profile->json_output); |
| 981 | } else { |
| 982 | DCHECK_EQ(format, TRuntimeProfileFormat::STRING); |
| 983 | ObjectPool tmp_pool; |
| 984 | RuntimeProfile* tmp_profile; |
| 985 | RETURN_IF_ERROR(RuntimeProfile::DecompressToProfile( |
| 986 | query_record.compressed_profile, &tmp_pool, &tmp_profile)); |
| 987 | tmp_profile->PrettyPrint(profile->string_output); |
| 988 | } |
| 989 | return Status::OK(); |
| 990 | } |
| 991 | |
| 992 | void ImpalaServer::WaitForNewCatalogServiceId( |
| 993 | const TUniqueId& cur_service_id, unique_lock<mutex>* ver_lock) { |
nothing calls this directly
no test coverage detected