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

Function IsPeekTimeoutTException

be/src/rpc/thrift-util.cc:304–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304bool IsPeekTimeoutTException(const TTransportException& e) {
305 // String taken from TSocket::peek() Thrift's TSocket.cpp and TSSLSocket.cpp.
306 return (e.getType() == TTransportException::UNKNOWN
307 && strstr(e.what(), "recv(): Resource temporarily unavailable") != nullptr)
308 || (e.getType() == TTransportException::TIMED_OUT
309 && strstr(e.what(), "THRIFT_POLL (timed out)") != nullptr);
310}
311
312bool IsConnResetTException(const TTransportException& e) {
313 // Strings taken from TTransport::readAll(). This happens iff TSocket::read() returns 0.

Callers 1

PeekMethod · 0.85

Calls 1

getTypeMethod · 0.65

Tested by

no test coverage detected