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

Method UpdateRemoteStats

be/src/scheduling/admission-controller.cc:2174–2195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2172}
2173
2174void AdmissionController::PoolStats::UpdateRemoteStats(
2175 const string& host_id, TPoolStats* host_stats) {
2176 DCHECK_NE(host_id, parent_->host_id_); // Shouldn't be updating for local host.
2177 RemoteStatsMap::iterator it = remote_stats_.find(host_id);
2178 if (VLOG_ROW_IS_ON) {
2179 stringstream ss;
2180 ss << "Stats update for pool=" << name_ << " backend=" << host_id;
2181 if (host_stats == nullptr) ss << " topic deletion";
2182 if (it != remote_stats_.end()) ss << " previous: " << DebugPoolStats(it->second);
2183 if (host_stats != nullptr) ss << " new: " << DebugPoolStats(*host_stats);
2184 VLOG_ROW << ss.str();
2185 }
2186 if (host_stats == nullptr) {
2187 if (it != remote_stats_.end()) {
2188 remote_stats_.erase(it);
2189 } else {
2190 VLOG_QUERY << "Attempted to remove non-existent remote stats for host=" << host_id;
2191 }
2192 } else {
2193 remote_stats_[host_id] = *host_stats;
2194 }
2195}
2196
2197void AdmissionController::HandleTopicUpdates(
2198 const vector<TTopicItem>& topic_updates, set<string>& pool_stats_removed_nodes) {

Callers 1

HandleTopicUpdatesMethod · 0.80

Calls 4

eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected