diff options
| author | hiddenpath <[email protected]> | 2024-12-13 20:18:29 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2024-12-13 20:58:57 +0300 |
| commit | 91a8ffd57d8783a3d940c9506254fa7e2012e1ec (patch) | |
| tree | e482755ebffea84fefd270a9a9d2a32b604d18ad /yt/cpp/mapreduce/client/client.cpp | |
| parent | 8afd0e6dc9d41134a0cccfd6b6c5fe843efd80fb (diff) | |
yt/cpp/mapreduce: move Create to THttpRawClient
commit_hash:9ca8428c322034064576bb56f74e704425ce7de9
Diffstat (limited to 'yt/cpp/mapreduce/client/client.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/client.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/yt/cpp/mapreduce/client/client.cpp b/yt/cpp/mapreduce/client/client.cpp index 24aed7fb77f..45a5bf1d47e 100644 --- a/yt/cpp/mapreduce/client/client.cpp +++ b/yt/cpp/mapreduce/client/client.cpp @@ -112,7 +112,11 @@ TNodeId TClientBase::Create( ENodeType type, const TCreateOptions& options) { - return NRawClient::Create(ClientRetryPolicy_->CreatePolicyForGenericRequest(), Context_, TransactionId_, path, type, options); + return RequestWithRetry<TNodeId>( + ClientRetryPolicy_->CreatePolicyForGenericRequest(), + [this, &path, &type, &options] (TMutationId& mutationId) { + return RawClient_->Create(mutationId, TransactionId_, path, type, options); + }); } void TClientBase::Remove( @@ -337,8 +341,11 @@ IFileWriterPtr TClientBase::CreateFileWriter( return RawClient_->Exists(mutationId, TransactionId_, realPath.Path_); }); if (!exists) { - NRawClient::Create(ClientRetryPolicy_->CreatePolicyForGenericRequest(), Context_, TransactionId_, realPath.Path_, NT_FILE, - TCreateOptions().IgnoreExisting(true)); + RequestWithRetry<void>( + ClientRetryPolicy_->CreatePolicyForGenericRequest(), + [this, &realPath] (TMutationId& mutationId) { + RawClient_->Create(mutationId, TransactionId_, realPath.Path_, NT_FILE, TCreateOptions().IgnoreExisting(true)); + }); } return new TFileWriter(realPath, RawClient_, ClientRetryPolicy_, GetTransactionPinger(), Context_, TransactionId_, options); @@ -737,8 +744,11 @@ THolder<TClientWriter> TClientBase::CreateClientWriter( return RawClient_->Exists(mutationId, TransactionId_, realPath.Path_); }); if (!exists) { - NRawClient::Create(ClientRetryPolicy_->CreatePolicyForGenericRequest(), Context_, TransactionId_, realPath.Path_, NT_TABLE, - TCreateOptions().IgnoreExisting(true)); + RequestWithRetry<void>( + ClientRetryPolicy_->CreatePolicyForGenericRequest(), + [this, &realPath] (TMutationId& mutataionId) { + RawClient_->Create(mutataionId, TransactionId_, realPath.Path_, NT_TABLE, TCreateOptions().IgnoreExisting(true)); + }); } return MakeHolder<TClientWriter>( |
