diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2024-12-28 16:17:41 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2024-12-28 16:58:14 +0300 |
commit | 1217ad4cbdfb5b1e52f8461a0681dd24bf1d6b70 (patch) | |
tree | 827350324013426197e185ec2a1e0969113afe34 /yt | |
parent | 8ff3898891499e702afdf66722fa8a5cfe4c2336 (diff) | |
download | ydb-1217ad4cbdfb5b1e52f8461a0681dd24bf1d6b70.tar.gz |
YT-23616: Introduce transaction methods for TRpcRawClient
commit_hash:5baba43028bd5954a84c7897bd52dc101e9733c3
Diffstat (limited to 'yt')
-rw-r--r-- | yt/cpp/mapreduce/common/helpers.cpp | 16 | ||||
-rw-r--r-- | yt/cpp/mapreduce/common/helpers.h | 2 | ||||
-rw-r--r-- | yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp | 16 |
3 files changed, 18 insertions, 16 deletions
diff --git a/yt/cpp/mapreduce/common/helpers.cpp b/yt/cpp/mapreduce/common/helpers.cpp index 95924d812c..220ab3f27f 100644 --- a/yt/cpp/mapreduce/common/helpers.cpp +++ b/yt/cpp/mapreduce/common/helpers.cpp @@ -121,6 +121,22 @@ TString GetReadFileCommand(const TString& apiVersion) return apiVersion == "v2" ? "download" : "read_file"; } +TString GetDefaultTransactionTitle() +{ + const auto processState = TProcessState::Get(); + TStringStream res; + + res << "User transaction. Created by: " << processState->UserName << " on " << processState->FqdnHostName + << " client: " << processState->ClientVersion << " pid: " << processState->Pid; + res << " program: " << processState->BinaryName; + +#ifndef NDEBUG + res << " build: debug"; +#endif + + return res.Str(); +} + //////////////////////////////////////////////////////////////////////////////// } // namespace NYT diff --git a/yt/cpp/mapreduce/common/helpers.h b/yt/cpp/mapreduce/common/helpers.h index 2174ba820b..2cc174e282 100644 --- a/yt/cpp/mapreduce/common/helpers.h +++ b/yt/cpp/mapreduce/common/helpers.h @@ -32,6 +32,8 @@ TString GetReadTableCommand(const TString& apiVersion); TString GetWriteFileCommand(const TString& apiVersion); TString GetReadFileCommand(const TString& apiVersion); +TString GetDefaultTransactionTitle(); + //////////////////////////////////////////////////////////////////////////////// } // namespace NYT diff --git a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp index 65bf9e29a5..1a3cee9489 100644 --- a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp +++ b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp @@ -78,22 +78,6 @@ static void SetFirstLastTabletIndex(TNode* node, const TOptions& options) } } -static TString GetDefaultTransactionTitle() -{ - const auto processState = TProcessState::Get(); - TStringStream res; - - res << "User transaction. Created by: " << processState->UserName << " on " << processState->FqdnHostName - << " client: " << processState->ClientVersion << " pid: " << processState->Pid; - res << " program: " << processState->BinaryName; - -#ifndef NDEBUG - res << " build: debug"; -#endif - - return res.Str(); -} - template <typename T> void SerializeMasterReadOptions(TNode* node, const TMasterReadOptions<T>& options) { |