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

Function StatusFromProto

be/src/common/status-serialization.cc:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46Status StatusFromProto(const StatusPB& status) {
47 if (status.status_code() == TErrorCode::OK) return Status::OK();
48
49 ErrorMsg msg;
50 msg.SetErrorCode(static_cast<TErrorCode::type>(status.status_code()));
51 if (status.error_msgs().size() > 0) {
52 // The first message is the actual error message. (See StatusToThrift()).
53 msg.SetErrorMsg(status.error_msgs().Get(0));
54 // The following messages are details.
55 std::for_each(status.error_msgs().begin() + 1, status.error_msgs().end(),
56 [&](string const& detail) { msg.AddDetail(detail); });
57 }
58 return Status(msg);
59}
60
61Status StatusFromHS2Status(
62 const apache::hive::service::cli::thrift::TStatus& hs2_status) {

Callers 15

TryAdmitQueryMethod · 0.85
SubmitForAdmissionMethod · 0.85
ReleaseQueryMethod · 0.85
ReleaseQueryBackendsMethod · 0.85
CancelAdmissionMethod · 0.85
ExecShutdownRequestMethod · 0.85
TryKillQueryRemotelyMethod · 0.85
ExecCompleteCbMethod · 0.85
ApplyExecStatusReportMethod · 0.85
CancelMethod · 0.85
ReportExecStatusMethod · 0.85

Calls 9

OKFunction · 0.85
SetErrorCodeMethod · 0.80
SetErrorMsgMethod · 0.80
StatusClass · 0.70
sizeMethod · 0.45
GetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
AddDetailMethod · 0.45

Tested by

no test coverage detected