diff options
| author | achains <[email protected]> | 2025-12-12 11:12:23 +0300 |
|---|---|---|
| committer | achains <[email protected]> | 2025-12-12 11:27:31 +0300 |
| commit | 3bd4aa5fcb0f9a73ef9fcc548c26a0aa81011981 (patch) | |
| tree | 59278b0d6fe997b5caa3ad0e2a83b9b99cd70714 /yt/cpp/mapreduce/http_client/raw_client.cpp | |
| parent | 485533da7c2417a6cc55d65af62740ff85a109a5 (diff) | |
YT-26906: start session from tx
* Changelog entry
Type: feature
Component: cpp-sdk
Start distributed session methods (file/table) now support attaching to transaction.
commit_hash:0a40dfd6d556f9890fa5abccf29c0baf33df4e7d
Diffstat (limited to 'yt/cpp/mapreduce/http_client/raw_client.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/http_client/raw_client.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/yt/cpp/mapreduce/http_client/raw_client.cpp b/yt/cpp/mapreduce/http_client/raw_client.cpp index 8d896f93e45..010e0a47f42 100644 --- a/yt/cpp/mapreduce/http_client/raw_client.cpp +++ b/yt/cpp/mapreduce/http_client/raw_client.cpp @@ -931,20 +931,17 @@ T DeserializeStartWriteSessionResponse(TNode node) TDistributedWriteTableSessionWithCookies THttpRawClient::StartDistributedWriteTableSession( TMutationId& mutationId, + const TTransactionId& transactionId, const TRichYPath& richPath, i64 cookieCount, - const TStartDistributedWriteTableOptions& /*options*/) + const TStartDistributedWriteTableOptions& options) { // NB(achains): C++ client by default uses v3 api while v4 is not fully supported. // Explicit command path is needed until v4 is not default version. THttpHeader header("GET", "api/v4/start_distributed_write_session", /*isApi*/ false); header.AddMutationId(); - TNode parameters; - parameters["path"] = PathToNode(richPath); - parameters["cookie_count"] = cookieCount; - - header.MergeParameters(parameters); + header.MergeParameters(NRawClient::SerializeParamsForStartDistributedTableSession(transactionId, richPath, cookieCount, options)); auto responseInfo = RequestWithoutRetry(Context_, mutationId, header); @@ -1014,20 +1011,17 @@ std::unique_ptr<IOutputStreamWithResponse> THttpRawClient::WriteTableFragment( TDistributedWriteFileSessionWithCookies THttpRawClient::StartDistributedWriteFileSession( TMutationId& mutationId, + const TTransactionId& transactionId, const TRichYPath& richPath, i64 cookieCount, - const TStartDistributedWriteFileOptions& /*options*/) + const TStartDistributedWriteFileOptions& options) { // NB(achains): C++ client by default uses v3 api while v4 is not fully supported. // Explicit command path is needed until v4 is not default version. THttpHeader header("GET", "api/v4/start_distributed_write_file_session", /*isApi*/ false); header.AddMutationId(); - TNode parameters; - parameters["path"] = PathToNode(richPath); - parameters["cookie_count"] = cookieCount; - - header.MergeParameters(parameters); + header.MergeParameters(NRawClient::SerializeParamsForStartDistributedFileSession(transactionId, richPath, cookieCount, options)); auto responseInfo = RequestWithoutRetry(Context_, mutationId, header); |
