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

Method Supervise

be/src/rpc/thrift-server.cc:151–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void ThriftServer::ThriftServerEventProcessor::Supervise() {
152 DCHECK(thrift_server_->server_.get() != NULL);
153 try {
154 thrift_server_->server_->serve();
155 } catch (TException& e) {
156 LOG(ERROR) << "ThriftServer '" << thrift_server_->name_ << "' (on port: "
157 << thrift_server_->port_ << ") exited due to TException: " << e.what();
158 }
159 {
160 // signal_lock_ ensures mutual exclusion of access to thrift_server_
161 lock_guard<mutex> lock(signal_lock_);
162 thrift_server_->started_ = false;
163
164 // There may not be anyone waiting on this signal (if the
165 // exception occurs after startup). That's not a problem, this is
166 // just to avoid waiting for the timeout in case of a bind
167 // failure, for example.
168 signal_fired_ = true;
169 }
170 signal_cond_.NotifyAll();
171}
172
173void ThriftServer::ThriftServerEventProcessor::preServe() {
174 // Acquire the signal lock to ensure that StartAndWaitForServer is

Callers

nothing calls this directly

Calls 3

NotifyAllMethod · 0.80
getMethod · 0.65
serveMethod · 0.45

Tested by

no test coverage detected