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

Function PrintErrorMap

be/src/util/error-util.cc:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void PrintErrorMap(ostream* stream, const ErrorLogMap& errors) {
55 for (const ErrorLogMap::value_type& v: errors) {
56 const ErrorLogEntryPB& entry = v.second;
57 if (v.first == TErrorCode::GENERAL) {
58 DCHECK_EQ(entry.count(), 0);
59 for (auto& msg : entry.messages()) {
60 *stream << msg << "\n";
61 }
62 } else if (entry.messages_size() > 0) {
63 DCHECK_GT(entry.count(), 0);
64 DCHECK_EQ(entry.messages_size(), 1);
65 *stream << *(entry.messages().begin());
66 if (entry.count() == 1) {
67 *stream << "\n";
68 } else {
69 *stream << " (1 of " << entry.count() << " similar)\n";
70 }
71 }
72 }
73}
74
75string PrintErrorMapToString(const ErrorLogMap& errors) {
76 stringstream stream;

Callers 1

PrintErrorMapToStringFunction · 0.85

Calls 2

countMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected