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

Method Open

be/src/rpc/thrift-client.cc:64–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64Status ThriftClientImpl::Open() {
65 RETURN_IF_ERROR(init_status_);
66 try {
67 if (!transport_->isOpen()) {
68 transport_->open();
69 }
70 } catch (const TException& e) {
71 try {
72 transport_->close();
73 } catch (const TException& e) {
74 VLOG(1) << "Error closing socket to: " << TNetworkAddressToString(address_)
75 << ", ignoring (" << e.what() << ")";
76 }
77 // In certain cases in which the remote host is overloaded, this failure can
78 // happen quite frequently. Let's print this error message without the stack
79 // trace as there aren't many callers of this function.
80 const string& err_msg = Substitute("Couldn't open transport for $0 ($1)",
81 TNetworkAddressToString(address_), e.what());
82 VLOG(1) << err_msg;
83 return Status::Expected(err_msg);
84 }
85 return Status::OK();
86}
87
88Status ThriftClientImpl::OpenWithRetry(uint32_t num_tries, uint64_t wait_ms) {
89 // Socket creation failures are not recoverable.

Callers 3

TESTFunction · 0.45
TestMaxMessageSizeFunction · 0.45
TEST_PFunction · 0.45

Calls 6

TNetworkAddressToStringFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
openMethod · 0.65
closeMethod · 0.65
isOpenMethod · 0.45

Tested by 3

TESTFunction · 0.36
TestMaxMessageSizeFunction · 0.36
TEST_PFunction · 0.36