diff options
author | babenko <babenko@yandex-team.com> | 2024-09-02 23:52:22 +0300 |
---|---|---|
committer | babenko <babenko@yandex-team.com> | 2024-09-03 00:14:58 +0300 |
commit | fe922531a834595791f82fbf067c51886e290e03 (patch) | |
tree | 607ef91f5aac15fa552a9a5fc7d31a04cf2d17f6 | |
parent | f521542f2363de26174dc2fa8b2eb1a8806c3bd5 (diff) | |
download | ydb-fe922531a834595791f82fbf067c51886e290e03.tar.gz |
YT-22593: Switch to std::string for endpoint description
e17521ea2be2d1728e2ac9fbd71b93c95bce5ccd
32 files changed, 65 insertions, 65 deletions
diff --git a/yt/yt/client/api/rpc_proxy/connection_impl.cpp b/yt/yt/client/api/rpc_proxy/connection_impl.cpp index 3e84e0ef5d..5c2f4a7540 100644 --- a/yt/yt/client/api/rpc_proxy/connection_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/connection_impl.cpp @@ -164,7 +164,7 @@ public: , EndpointAttributes_(MakeEndpointAttributes(config, connectionId)) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription_; } @@ -205,7 +205,7 @@ private: const bool Sticky_; const TGuid ConnectionId_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IAttributeDictionaryPtr EndpointAttributes_; YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, SpinLock_); diff --git a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp index d523aaf188..f856c462d3 100644 --- a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp +++ b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp @@ -38,7 +38,7 @@ IChannelPtr CreateTimestampProviderChannel( auto channel = CreateBalancingChannel( config, std::move(channelFactory), - std::move(endpointDescription), + endpointDescription, std::move(endpointAttributes)); channel = CreateRetryingChannel( config, diff --git a/yt/yt/core/bus/bus.h b/yt/yt/core/bus/bus.h index 5140baf33f..6c0ded55a4 100644 --- a/yt/yt/core/bus/bus.h +++ b/yt/yt/core/bus/bus.h @@ -70,7 +70,7 @@ struct IBus { //! Returns a textual representation of the bus' endpoint. //! Typically used for logging. - virtual const TString& GetEndpointDescription() const = 0; + virtual const std::string& GetEndpointDescription() const = 0; //! Returns the bus' endpoint attributes. //! Typically used for constructing errors. diff --git a/yt/yt/core/bus/client.h b/yt/yt/core/bus/client.h index ea91efd822..8c23346b95 100644 --- a/yt/yt/core/bus/client.h +++ b/yt/yt/core/bus/client.h @@ -22,7 +22,7 @@ struct IBusClient { //! Returns a textual representation of the bus' endpoint. //! Typically used for logging. - virtual const TString& GetEndpointDescription() const = 0; + virtual const std::string& GetEndpointDescription() const = 0; //! Returns the bus' endpoint attributes. //! Typically used for constructing errors. diff --git a/yt/yt/core/bus/tcp/client.cpp b/yt/yt/core/bus/tcp/client.cpp index 3fc419d7d9..f871d42c68 100644 --- a/yt/yt/core/bus/tcp/client.cpp +++ b/yt/yt/core/bus/tcp/client.cpp @@ -51,7 +51,7 @@ public: Connection_->Terminate(TError(NBus::EErrorCode::TransportError, "Bus terminated")); } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { VERIFY_THREAD_AFFINITY_ANY(); return Connection_->GetEndpointDescription(); @@ -161,7 +161,7 @@ public: .EndMap()); } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription_; } @@ -220,7 +220,7 @@ private: const IMemoryUsageTrackerPtr MemoryUsageTracker_; - TString EndpointDescription_; + std::string EndpointDescription_; IAttributeDictionaryPtr EndpointAttributes_; }; diff --git a/yt/yt/core/bus/tcp/connection.cpp b/yt/yt/core/bus/tcp/connection.cpp index 871d039ae9..b71fbb9363 100644 --- a/yt/yt/core/bus/tcp/connection.cpp +++ b/yt/yt/core/bus/tcp/connection.cpp @@ -106,7 +106,7 @@ TTcpConnection::TTcpConnection( TConnectionId id, SOCKET socket, EMultiplexingBand multiplexingBand, - const TString& endpointDescription, + const std::string& endpointDescription, const IAttributeDictionary& endpointAttributes, const TNetworkAddress& endpointNetworkAddress, const std::optional<std::string>& endpointAddress, @@ -654,7 +654,7 @@ void TTcpConnection::OnDialerFinished(const TErrorOr<SOCKET>& socketOrError) } } -const TString& TTcpConnection::GetEndpointDescription() const +const std::string& TTcpConnection::GetEndpointDescription() const { return EndpointDescription_; } diff --git a/yt/yt/core/bus/tcp/connection.h b/yt/yt/core/bus/tcp/connection.h index 0559282f6c..d5d631f3b2 100644 --- a/yt/yt/core/bus/tcp/connection.h +++ b/yt/yt/core/bus/tcp/connection.h @@ -80,7 +80,7 @@ public: TConnectionId id, SOCKET socket, EMultiplexingBand multiplexingBand, - const TString& endpointDescription, + const std::string& endpointDescription, const NYTree::IAttributeDictionary& endpointAttributes, const NNet::TNetworkAddress& endpointNetworkAddress, const std::optional<std::string>& endpointAddress, @@ -104,7 +104,7 @@ public: void OnShutdown() override; // IBus implementation. - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; const std::string& GetEndpointAddress() const override; const NNet::TNetworkAddress& GetEndpointNetworkAddress() const override; @@ -187,7 +187,7 @@ private: const TBusConfigPtr Config_; const EConnectionType ConnectionType_; const TConnectionId Id_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const NYTree::IAttributeDictionaryPtr EndpointAttributes_; const NNet::TNetworkAddress EndpointNetworkAddress_; const std::optional<TString> EndpointAddress_; diff --git a/yt/yt/core/rpc/balancing_channel.cpp b/yt/yt/core/rpc/balancing_channel.cpp index f5dbc43ec3..7884bba0d2 100644 --- a/yt/yt/core/rpc/balancing_channel.cpp +++ b/yt/yt/core/rpc/balancing_channel.cpp @@ -42,7 +42,7 @@ public: TBalancingChannelSubprovider( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, IAttributeDictionaryPtr endpointAttributes, std::string serviceName, IPeerDiscoveryPtr peerDiscovery) @@ -96,7 +96,7 @@ public: private: const TBalancingChannelConfigPtr Config_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IAttributeDictionaryPtr EndpointAttributes_; const TString ServiceName_; @@ -176,7 +176,7 @@ public: TBalancingChannelProvider( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, IAttributeDictionaryPtr endpointAttributes, IPeerDiscoveryPtr peerDiscovery) : Config_(std::move(config)) @@ -192,7 +192,7 @@ public: , PeerDiscovery_(std::move(peerDiscovery)) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription_; } @@ -243,7 +243,7 @@ private: const TBalancingChannelConfigPtr Config_; const IChannelFactoryPtr ChannelFactory_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IAttributeDictionaryPtr EndpointAttributes_; const IPeerDiscoveryPtr PeerDiscovery_; @@ -288,14 +288,14 @@ DEFINE_REFCOUNTED_TYPE(TBalancingChannelProvider) IChannelPtr CreateBalancingChannel( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, IAttributeDictionaryPtr endpointAttributes, IPeerDiscoveryPtr peerDiscovery) { auto channelProvider = CreateBalancingChannelProvider( std::move(config), std::move(channelFactory), - std::move(endpointDescription), + endpointDescription, std::move(endpointAttributes), std::move(peerDiscovery)); @@ -305,7 +305,7 @@ IChannelPtr CreateBalancingChannel( IRoamingChannelProviderPtr CreateBalancingChannelProvider( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, IAttributeDictionaryPtr endpointAttributes, IPeerDiscoveryPtr peerDiscovery) { @@ -316,7 +316,7 @@ IRoamingChannelProviderPtr CreateBalancingChannelProvider( return New<TBalancingChannelProvider>( std::move(config), std::move(channelFactory), - std::move(endpointDescription), + endpointDescription, std::move(endpointAttributes), std::move(peerDiscovery)); } diff --git a/yt/yt/core/rpc/balancing_channel.h b/yt/yt/core/rpc/balancing_channel.h index 2d448dd7cc..452b5e496c 100644 --- a/yt/yt/core/rpc/balancing_channel.h +++ b/yt/yt/core/rpc/balancing_channel.h @@ -16,14 +16,14 @@ namespace NYT::NRpc { IChannelPtr CreateBalancingChannel( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, NYTree::IAttributeDictionaryPtr endpointAttributes, IPeerDiscoveryPtr peerDiscovery = CreateDefaultPeerDiscovery()); IRoamingChannelProviderPtr CreateBalancingChannelProvider( TBalancingChannelConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, NYTree::IAttributeDictionaryPtr endpointAttributes, IPeerDiscoveryPtr peerDiscovery = CreateDefaultPeerDiscovery()); diff --git a/yt/yt/core/rpc/bus/channel.cpp b/yt/yt/core/rpc/bus/channel.cpp index c10204f12d..f3959aed7b 100644 --- a/yt/yt/core/rpc/bus/channel.cpp +++ b/yt/yt/core/rpc/bus/channel.cpp @@ -64,7 +64,7 @@ public: YT_VERIFY(MemoryUsageTracker_); } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return Client_->GetEndpointDescription(); } diff --git a/yt/yt/core/rpc/channel.h b/yt/yt/core/rpc/channel.h index 1a815d8878..cd19d408b1 100644 --- a/yt/yt/core/rpc/channel.h +++ b/yt/yt/core/rpc/channel.h @@ -92,7 +92,7 @@ struct IChannel { //! Returns a textual representation of the channel's endpoint. //! Typically used for logging. - virtual const TString& GetEndpointDescription() const = 0; + virtual const std::string& GetEndpointDescription() const = 0; //! Returns the channel's endpoint attributes. //! Typically used for constructing errors. diff --git a/yt/yt/core/rpc/channel_detail.cpp b/yt/yt/core/rpc/channel_detail.cpp index 8b68f3d754..89750b2e6f 100644 --- a/yt/yt/core/rpc/channel_detail.cpp +++ b/yt/yt/core/rpc/channel_detail.cpp @@ -21,7 +21,7 @@ TChannelWrapper::TChannelWrapper(IChannelPtr underlyingChannel) YT_ASSERT(UnderlyingChannel_); } -const TString& TChannelWrapper::GetEndpointDescription() const +const std::string& TChannelWrapper::GetEndpointDescription() const { return UnderlyingChannel_->GetEndpointDescription(); } diff --git a/yt/yt/core/rpc/channel_detail.h b/yt/yt/core/rpc/channel_detail.h index a601ab19c2..63fc79d879 100644 --- a/yt/yt/core/rpc/channel_detail.h +++ b/yt/yt/core/rpc/channel_detail.h @@ -14,7 +14,7 @@ class TChannelWrapper public: explicit TChannelWrapper(IChannelPtr underlyingChannel); - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; IClientRequestControlPtr Send( diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp index a469175212..ef9c4b80eb 100644 --- a/yt/yt/core/rpc/dynamic_channel_pool.cpp +++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp @@ -43,13 +43,13 @@ public: TImpl( TDynamicChannelPoolConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, IAttributeDictionaryPtr endpointAttributes, std::string serviceName, IPeerDiscoveryPtr peerDiscovery) : Config_(std::move(config)) , ChannelFactory_(std::move(channelFactory)) - , EndpointDescription_(std::move(endpointDescription)) + , EndpointDescription_(endpointDescription) , EndpointAttributes_(ConvertToAttributes(BuildYsonStringFluently() .BeginMap() .Items(*endpointAttributes) @@ -188,7 +188,7 @@ private: const TDynamicChannelPoolConfigPtr Config_; const IChannelFactoryPtr ChannelFactory_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IAttributeDictionaryPtr EndpointAttributes_; const std::string ServiceName_; IPeerDiscoveryPtr PeerDiscovery_; @@ -900,14 +900,14 @@ private: TDynamicChannelPool::TDynamicChannelPool( TDynamicChannelPoolConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, NYTree::IAttributeDictionaryPtr endpointAttributes, std::string serviceName, IPeerDiscoveryPtr peerDiscovery) : Impl_(New<TImpl>( std::move(config), std::move(channelFactory), - std::move(endpointDescription), + endpointDescription, std::move(endpointAttributes), std::move(serviceName), std::move(peerDiscovery))) diff --git a/yt/yt/core/rpc/dynamic_channel_pool.h b/yt/yt/core/rpc/dynamic_channel_pool.h index 7ac5f2c233..9bd33b9bb1 100644 --- a/yt/yt/core/rpc/dynamic_channel_pool.h +++ b/yt/yt/core/rpc/dynamic_channel_pool.h @@ -28,7 +28,7 @@ public: TDynamicChannelPool( TDynamicChannelPoolConfigPtr config, IChannelFactoryPtr channelFactory, - TString endpointDescription, + const std::string& endpointDescription, NYTree::IAttributeDictionaryPtr endpointAttributes, std::string serviceName, IPeerDiscoveryPtr peerDiscovery); diff --git a/yt/yt/core/rpc/grpc/channel.cpp b/yt/yt/core/rpc/grpc/channel.cpp index 55f803519d..81a17d4d01 100644 --- a/yt/yt/core/rpc/grpc/channel.cpp +++ b/yt/yt/core/rpc/grpc/channel.cpp @@ -149,7 +149,7 @@ public: } // IChannel implementation. - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointAddress_; } diff --git a/yt/yt/core/rpc/grpc/server.cpp b/yt/yt/core/rpc/grpc/server.cpp index e19bc7a47d..bb693aea89 100644 --- a/yt/yt/core/rpc/grpc/server.cpp +++ b/yt/yt/core/rpc/grpc/server.cpp @@ -238,7 +238,7 @@ private: { } // IBus overrides. - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return PeerAddressString_; } diff --git a/yt/yt/core/rpc/hedging_channel.cpp b/yt/yt/core/rpc/hedging_channel.cpp index 0b9fbd3c6f..74d92eb777 100644 --- a/yt/yt/core/rpc/hedging_channel.cpp +++ b/yt/yt/core/rpc/hedging_channel.cpp @@ -345,7 +345,7 @@ public: .EndMap())) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription_; } @@ -403,7 +403,7 @@ private: const THedgingChannelOptions Options_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IAttributeDictionaryPtr EndpointAttributes_; }; diff --git a/yt/yt/core/rpc/http/channel.cpp b/yt/yt/core/rpc/http/channel.cpp index 8b868d9d71..97fea41b23 100644 --- a/yt/yt/core/rpc/http/channel.cpp +++ b/yt/yt/core/rpc/http/channel.cpp @@ -45,7 +45,7 @@ public: } // IChannel implementation. - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointAddress_; } diff --git a/yt/yt/core/rpc/http/server.cpp b/yt/yt/core/rpc/http/server.cpp index eb6545015f..cce02b7779 100644 --- a/yt/yt/core/rpc/http/server.cpp +++ b/yt/yt/core/rpc/http/server.cpp @@ -54,7 +54,7 @@ public: , Logger(logger) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointAddress_; } diff --git a/yt/yt/core/rpc/local_channel.cpp b/yt/yt/core/rpc/local_channel.cpp index cbe73574cc..9a45500054 100644 --- a/yt/yt/core/rpc/local_channel.cpp +++ b/yt/yt/core/rpc/local_channel.cpp @@ -34,7 +34,7 @@ static constexpr auto& Logger = RpcClientLogger; //////////////////////////////////////////////////////////////////////////////// -static const TString EndpointDescription = "<local>"; +static const std::string EndpointDescription = "<local>"; static const IAttributeDictionaryPtr EndpointAttributes = ConvertToAttributes(BuildYsonStringFluently() .BeginMap() @@ -51,7 +51,7 @@ public: : Server_(std::move(server)) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription; } @@ -165,7 +165,7 @@ private: } } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription; } diff --git a/yt/yt/core/rpc/null_channel.cpp b/yt/yt/core/rpc/null_channel.cpp index 9e7b831925..a381ab88d1 100644 --- a/yt/yt/core/rpc/null_channel.cpp +++ b/yt/yt/core/rpc/null_channel.cpp @@ -21,7 +21,7 @@ public: : Address_(address) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return Address_; } diff --git a/yt/yt/core/rpc/roaming_channel.cpp b/yt/yt/core/rpc/roaming_channel.cpp index f0c011cc15..93717ea4f1 100644 --- a/yt/yt/core/rpc/roaming_channel.cpp +++ b/yt/yt/core/rpc/roaming_channel.cpp @@ -124,7 +124,7 @@ public: : Provider_(std::move(provider)) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return Provider_->GetEndpointDescription(); } diff --git a/yt/yt/core/rpc/roaming_channel.h b/yt/yt/core/rpc/roaming_channel.h index b0e4524907..2f2874fc17 100644 --- a/yt/yt/core/rpc/roaming_channel.h +++ b/yt/yt/core/rpc/roaming_channel.h @@ -14,7 +14,7 @@ struct IRoamingChannelProvider : public virtual TRefCounted { //! Cf. IChannel::GetEndpointDescription. - virtual const TString& GetEndpointDescription() const = 0; + virtual const std::string& GetEndpointDescription() const = 0; //! Cf. IChannel::GetEndpointAttributes. virtual const NYTree::IAttributeDictionary& GetEndpointAttributes() const = 0; diff --git a/yt/yt/core/rpc/server_detail.cpp b/yt/yt/core/rpc/server_detail.cpp index 7dc3ae052f..252f64d12c 100644 --- a/yt/yt/core/rpc/server_detail.cpp +++ b/yt/yt/core/rpc/server_detail.cpp @@ -328,7 +328,7 @@ const IAttributeDictionary& TServiceContextBase::GetEndpointAttributes() const return EmptyAttributes(); } -const TString& TServiceContextBase::GetEndpointDescription() const +const std::string& TServiceContextBase::GetEndpointDescription() const { static const TString EmptyEndpointDescription; return EmptyEndpointDescription; @@ -530,7 +530,7 @@ const NYTree::IAttributeDictionary& TServiceContextWrapper::GetEndpointAttribute return UnderlyingContext_->GetEndpointAttributes(); } -const TString& TServiceContextWrapper::GetEndpointDescription() const +const std::string& TServiceContextWrapper::GetEndpointDescription() const { return UnderlyingContext_->GetEndpointDescription(); } diff --git a/yt/yt/core/rpc/server_detail.h b/yt/yt/core/rpc/server_detail.h index f1976b091a..16c56e9eb1 100644 --- a/yt/yt/core/rpc/server_detail.h +++ b/yt/yt/core/rpc/server_detail.h @@ -34,7 +34,7 @@ public: TRequestId GetRequestId() const override; NYT::NBus::TBusNetworkStatistics GetBusNetworkStatistics() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; i64 GetTotalSize() const override; @@ -199,7 +199,7 @@ public: NRpc::TRequestId GetRequestId() const override; NYT::NBus::TBusNetworkStatistics GetBusNetworkStatistics() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; std::optional<TInstant> GetStartTime() const override; std::optional<TDuration> GetTimeout() const override; diff --git a/yt/yt/core/rpc/service.h b/yt/yt/core/rpc/service.h index cab2e99b67..8511ad549a 100644 --- a/yt/yt/core/rpc/service.h +++ b/yt/yt/core/rpc/service.h @@ -59,7 +59,7 @@ struct IServiceContext virtual const NYTree::IAttributeDictionary& GetEndpointAttributes() const = 0; //! Returns the description of the connected endpoint. - virtual const TString& GetEndpointDescription() const = 0; + virtual const std::string& GetEndpointDescription() const = 0; //! Returns the instant when the current retry of request was issued by the client, if known. virtual std::optional<TInstant> GetStartTime() const = 0; diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp index 16175e8a88..aac129a53a 100644 --- a/yt/yt/core/rpc/service_detail.cpp +++ b/yt/yt/core/rpc/service_detail.cpp @@ -413,7 +413,7 @@ public: return ReplyBus_->GetEndpointAttributes(); } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return ReplyBus_->GetEndpointDescription(); } diff --git a/yt/yt/core/rpc/unittests/roaming_channel_ut.cpp b/yt/yt/core/rpc/unittests/roaming_channel_ut.cpp index 3c1d214ab9..b527bde12d 100644 --- a/yt/yt/core/rpc/unittests/roaming_channel_ut.cpp +++ b/yt/yt/core/rpc/unittests/roaming_channel_ut.cpp @@ -17,7 +17,7 @@ public: : Channel_(std::move(channel)) { } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { YT_UNIMPLEMENTED(); } @@ -61,7 +61,7 @@ public: Channel_.Set(std::move(channel)); } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { YT_UNIMPLEMENTED(); } @@ -99,7 +99,7 @@ class TNeverProvider : public IRoamingChannelProvider { public: - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { YT_UNIMPLEMENTED(); } diff --git a/yt/yt/core/rpc/unittests/viable_peer_registry_ut.cpp b/yt/yt/core/rpc/unittests/viable_peer_registry_ut.cpp index 563ff3c3cf..cad9357c47 100644 --- a/yt/yt/core/rpc/unittests/viable_peer_registry_ut.cpp +++ b/yt/yt/core/rpc/unittests/viable_peer_registry_ut.cpp @@ -95,7 +95,7 @@ public: } } - const TString& GetEndpointDescription() const override + const std::string& GetEndpointDescription() const override { return EndpointDescription_; } @@ -139,7 +139,7 @@ public: private: const std::string Address_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const IMemoryUsageTrackerPtr MemoryUsageTracker_ = GetNullMemoryUsageTracker(); THashSet<std::string>* ChannelRegistry_; @@ -366,7 +366,7 @@ TEST_P(TParametrizedViablePeerRegistryTest, GetRandomChannel) EXPECT_TRUE(viablePeerRegistry->RegisterPeer(Format("address-%v", i))); } - THashSet<TString> retrievedAddresses; + THashSet<std::string> retrievedAddresses; auto req = CreateRequest(); for (int iter = 0; iter < 100; ++iter) { @@ -388,7 +388,7 @@ TEST_P(TParametrizedViablePeerRegistryTest, GetStickyChannel) EXPECT_TRUE(viablePeerRegistry->RegisterPeer(Format("address-%v", i))); } - THashSet<TString> retrievedAddresses; + THashSet<std::string> retrievedAddresses; auto req = CreateRequest(/*enableStickiness*/ true); for (int iter = 0; iter < 100; ++iter) { @@ -544,7 +544,7 @@ TEST(TPreferLocalViablePeerRegistryTest, MinPeerCountForPriorityAwareness) EXPECT_TRUE(viablePeerRegistry->RegisterPeer(Format("non-local-%v.sas.yp-c.yandex.net", i))); } - THashSet<TString> retrievedAddresses; + THashSet<std::string> retrievedAddresses; auto req = CreateRequest(); for (int iter = 0; iter < 100; ++iter) { diff --git a/yt/yt/core/test_framework/test_proxy_service.cpp b/yt/yt/core/test_framework/test_proxy_service.cpp index 56c6df767b..a42aed35d1 100644 --- a/yt/yt/core/test_framework/test_proxy_service.cpp +++ b/yt/yt/core/test_framework/test_proxy_service.cpp @@ -37,7 +37,7 @@ TTestChannel::TTestChannel( .EndMap())) { } -const TString& TTestChannel::GetEndpointDescription() const +const std::string& TTestChannel::GetEndpointDescription() const { return Address_; } @@ -184,7 +184,7 @@ TTestBus::TTestBus(const std::string& address) , NetworkAddress_(NNet::TNetworkAddress()) { } -const TString& TTestBus::GetEndpointDescription() const +const std::string& TTestBus::GetEndpointDescription() const { return EndpointDescription_; } diff --git a/yt/yt/core/test_framework/test_proxy_service.h b/yt/yt/core/test_framework/test_proxy_service.h index e92739e33f..3f2c99415e 100644 --- a/yt/yt/core/test_framework/test_proxy_service.h +++ b/yt/yt/core/test_framework/test_proxy_service.h @@ -45,7 +45,7 @@ class TTestBus public: explicit TTestBus(const std::string& address); - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; @@ -75,7 +75,7 @@ public: private: const std::string Address_; - const TString EndpointDescription_; + const std::string EndpointDescription_; const NYTree::IAttributeDictionaryPtr Attributes_; const NNet::TNetworkAddress NetworkAddress_; @@ -98,7 +98,7 @@ public: TRealmIdServiceMap defaultServices, const std::string& address); - const TString& GetEndpointDescription() const override; + const std::string& GetEndpointDescription() const override; const NYTree::IAttributeDictionary& GetEndpointAttributes() const override; |