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

Method Maintenance

be/src/scheduling/executor-blacklist.cc:104–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void ExecutorBlacklist::Maintenance(std::list<BackendDescriptorPB>* probation_list) {
105 int64_t blacklist_timeout = GetBlacklistTimeoutMs();
106 int64_t probation_timeout = blacklist_timeout * PROBATION_TIMEOUT_MULTIPLIER;
107 int64_t now = MonotonicMillis();
108 auto entry_it = executor_list_.begin();
109 while (entry_it != executor_list_.end()) {
110 Entry& entry = entry_it->second;
111 int64_t elapsed = now - entry.blacklist_time_ms;
112 if (entry.state == State::BLACKLISTED) {
113 // Check if we can take it off the blacklist and put it on probation.
114 if (elapsed > blacklist_timeout * entry.num_consecutive_blacklistings) {
115 LOG(INFO) << "Executor " << entry.be_desc.address()
116 << " passed the timeout and will be taken off the blacklist.";
117 probation_list->push_back(entry.be_desc);
118 entry.state = State::ON_PROBATION;
119 }
120 ++entry_it;
121 } else {
122 // Check if we can take it off probation.
123 if (elapsed > probation_timeout * entry.num_consecutive_blacklistings) {
124 entry_it = executor_list_.erase(entry_it);
125 } else {
126 ++entry_it;
127 }
128 }
129 }
130 VLOG(2) << "Completed blacklist maintenance. Current blacklist: " << DebugString();
131}
132
133bool ExecutorBlacklist::IsBlacklisted(
134 const BackendDescriptorPB& be_desc, Status* cause, int64_t* time_remaining_ms) const {

Callers 1

UpdateMembershipMethod · 0.45

Calls 6

MonotonicMillisFunction · 0.85
push_backMethod · 0.80
eraseMethod · 0.80
DebugStringFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected