Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yiguolei committed Jan 29, 2025
1 parent 77263dc commit 140726b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions be/src/util/brpc_client_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@ class BrpcClientCache {
std::string connection_group = "");
virtual ~BrpcClientCache();

std::shared_ptr<T> get_client(const butil::EndPoint& endpoint) {
return get_client(butil::endpoint2str(endpoint).c_str());
}

#ifdef BE_TEST
virtual std::shared_ptr<T> get_client(const TNetworkAddress& taddr) {
std::string host_port = fmt::format("{}:{}", taddr.hostname, taddr.port);
Expand Down Expand Up @@ -237,10 +233,6 @@ class BrpcClientCache {
return erase(host_port);
}

size_t erase(const butil::EndPoint& endpoint) {
return _stub_map.erase(butil::endpoint2str(endpoint).c_str());
}

bool exist(const std::string& host_port) {
return _stub_map.find(host_port) != _stub_map.end();
}
Expand All @@ -251,10 +243,6 @@ class BrpcClientCache {
}
}

bool available(std::shared_ptr<T> stub, const butil::EndPoint& endpoint) {
return available(stub, butil::endpoint2str(endpoint).c_str());
}

bool available(std::shared_ptr<T> stub, const std::string& host_port) {
if (!stub) {
LOG(WARNING) << "stub is null to: " << host_port;
Expand Down

0 comments on commit 140726b

Please sign in to comment.