summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/client/client.cpp
diff options
context:
space:
mode:
authorachains <[email protected]>2025-12-12 11:12:23 +0300
committerachains <[email protected]>2025-12-12 11:27:31 +0300
commit3bd4aa5fcb0f9a73ef9fcc548c26a0aa81011981 (patch)
tree59278b0d6fe997b5caa3ad0e2a83b9b99cd70714 /yt/cpp/mapreduce/client/client.cpp
parent485533da7c2417a6cc55d65af62740ff85a109a5 (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/client/client.cpp')
-rw-r--r--yt/cpp/mapreduce/client/client.cpp50
1 files changed, 24 insertions, 26 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp
index 37bf2a509f9..c0fef27be62 100644
--- a/yt/cpp/mapreduce/client/client.cpp
+++ b/yt/cpp/mapreduce/client/client.cpp
@@ -100,6 +100,30 @@ ITransactionPtr TClientBase::StartTransaction(
return MakeIntrusive<TTransaction>(RawClient_, GetParentClientImpl(), Context_, TransactionId_, options);
}
+TDistributedWriteFileSessionWithCookies TClientBase::StartDistributedWriteFileSession(
+ const TRichYPath& richPath,
+ i64 cookieCount,
+ const TStartDistributedWriteFileOptions& options)
+{
+ return RequestWithRetry<TDistributedWriteFileSessionWithCookies>(
+ ClientRetryPolicy_->CreatePolicyForGenericRequest(),
+ [this, cookieCount, &richPath, &options] (TMutationId& mutationId) {
+ return RawClient_->StartDistributedWriteFileSession(mutationId, TransactionId_, richPath, cookieCount, options);
+ });
+}
+
+TDistributedWriteTableSessionWithCookies TClientBase::StartDistributedWriteTableSession(
+ const TRichYPath& richPath,
+ i64 cookieCount,
+ const TStartDistributedWriteTableOptions& options)
+{
+ return RequestWithRetry<TDistributedWriteTableSessionWithCookies>(
+ ClientRetryPolicy_->CreatePolicyForGenericRequest(),
+ [this, cookieCount, &richPath, &options] (TMutationId& mutationId) {
+ return RawClient_->StartDistributedWriteTableSession(mutationId, TransactionId_, richPath, cookieCount, options);
+ });
+}
+
TNodeId TClientBase::Create(
const TYPath& path,
ENodeType type,
@@ -1569,19 +1593,6 @@ void TClient::ResumeOperation(
});
}
-TDistributedWriteTableSessionWithCookies TClient::StartDistributedWriteTableSession(
- const TRichYPath& richPath,
- i64 cookieCount,
- const TStartDistributedWriteTableOptions& options)
-{
- CheckShutdown();
- return RequestWithRetry<TDistributedWriteTableSessionWithCookies>(
- ClientRetryPolicy_->CreatePolicyForGenericRequest(),
- [this, cookieCount, &richPath, &options] (TMutationId& mutationId) {
- return RawClient_->StartDistributedWriteTableSession(mutationId, richPath, cookieCount, options);
- });
-}
-
void TClient::PingDistributedWriteTableSession(
const TDistributedWriteTableSession& session,
const TPingDistributedWriteTableOptions& options)
@@ -1607,19 +1618,6 @@ void TClient::FinishDistributedWriteTableSession(
});
}
-TDistributedWriteFileSessionWithCookies TClient::StartDistributedWriteFileSession(
- const TRichYPath& richPath,
- i64 cookieCount,
- const TStartDistributedWriteFileOptions& options)
-{
- CheckShutdown();
- return RequestWithRetry<TDistributedWriteFileSessionWithCookies>(
- ClientRetryPolicy_->CreatePolicyForGenericRequest(),
- [this, cookieCount, &richPath, &options] (TMutationId& mutationId) {
- return RawClient_->StartDistributedWriteFileSession(mutationId, richPath, cookieCount, options);
- });
-}
-
void TClient::PingDistributedWriteFileSession(
const TDistributedWriteFileSession& session,
const TPingDistributedWriteFileOptions& options)