[CodeFormat] Clang-format cpp sources (#4965)

Clang-format all c++ source files.
This commit is contained in:
sduzh
2020-11-28 18:36:49 +08:00
committed by GitHub
parent f944bf4d44
commit 6fedf5881b
1331 changed files with 62548 additions and 68514 deletions

View File

@ -131,28 +131,26 @@ std::string StreamLoadContext::to_json_for_mini_load() const {
return s.GetString();
}
std::string StreamLoadContext::brief(bool detail) const {
std::stringstream ss;
ss << "id=" << id << ", job_id=" << job_id << ", txn_id=" << txn_id << ", label=" << label;
if (detail) {
switch(load_src_type) {
case TLoadSourceType::KAFKA:
if (kafka_info != nullptr) {
ss << ", kafka"
<< ", brokers: " << kafka_info->brokers
<< ", topic: " << kafka_info->topic
<< ", partition: ";
for (auto& entry : kafka_info->begin_offset) {
ss << "[" << entry.first << ": " << entry.second << "]";
}
switch (load_src_type) {
case TLoadSourceType::KAFKA:
if (kafka_info != nullptr) {
ss << ", kafka"
<< ", brokers: " << kafka_info->brokers << ", topic: " << kafka_info->topic
<< ", partition: ";
for (auto& entry : kafka_info->begin_offset) {
ss << "[" << entry.first << ": " << entry.second << "]";
}
break;
default:
break;
}
break;
default:
break;
}
}
return ss.str();
}
} // end namespace
} // namespace doris