diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2025-01-15 20:17:09 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2025-01-15 21:21:14 +0300 |
commit | bb37d56338bace93813adc51a61936a19acc8edc (patch) | |
tree | 3d771660421001c994e2baf9a40b409d06c7a24b /yt/cpp/mapreduce/client/operation_preparer.cpp | |
parent | 9a04c0af35c6a47061b3699089da07acfcf14587 (diff) | |
download | ydb-bb37d56338bace93813adc51a61936a19acc8edc.tar.gz |
YT-23616: Make THttpRawBatchRequest as an implementation of IRawBatchRequest interface
commit_hash:9e6c556686dda1562697762d38da532dc5c87b80
Diffstat (limited to 'yt/cpp/mapreduce/client/operation_preparer.cpp')
-rw-r--r-- | yt/cpp/mapreduce/client/operation_preparer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/yt/cpp/mapreduce/client/operation_preparer.cpp b/yt/cpp/mapreduce/client/operation_preparer.cpp index ac6ea0f923..1e5f81b5d9 100644 --- a/yt/cpp/mapreduce/client/operation_preparer.cpp +++ b/yt/cpp/mapreduce/client/operation_preparer.cpp @@ -42,7 +42,7 @@ public: , Transaction_(std::move(transaction)) { } - void PrepareRequest(NRawClient::THttpRawBatchRequest* batchRequest) override + void PrepareRequest(IRawBatchRequest* batchRequest) override { Future_ = batchRequest->GetOperation( OperationId_, @@ -213,26 +213,26 @@ void TOperationPreparer::LockFiles(TVector<TRichYPath>* paths) TVector<::NThreading::TFuture<TLockId>> lockIdFutures; lockIdFutures.reserve(paths->size()); - NRawClient::THttpRawBatchRequest lockRequest(GetContext().Config); + auto lockRequest = Client_->GetRawClient()->CreateRawBatchRequest(); for (const auto& path : *paths) { - lockIdFutures.push_back(lockRequest.Lock( + lockIdFutures.push_back(lockRequest->Lock( FileTransaction_->GetId(), path.Path_, ELockMode::LM_SNAPSHOT, TLockOptions().Waitable(true))); } - lockRequest.ExecuteBatch(ClientRetryPolicy_->CreatePolicyForGenericRequest(), GetContext()); + lockRequest->ExecuteBatch(); TVector<::NThreading::TFuture<TNode>> nodeIdFutures; nodeIdFutures.reserve(paths->size()); - NRawClient::THttpRawBatchRequest getNodeIdRequest(GetContext().Config); + auto getNodeIdRequest = Client_->GetRawClient()->CreateRawBatchRequest(); for (const auto& lockIdFuture : lockIdFutures) { - nodeIdFutures.push_back(getNodeIdRequest.Get( + nodeIdFutures.push_back(getNodeIdRequest->Get( FileTransaction_->GetId(), ::TStringBuilder() << '#' << GetGuidAsString(lockIdFuture.GetValue()) << "/@node_id", TGetOptions())); } - getNodeIdRequest.ExecuteBatch(ClientRetryPolicy_->CreatePolicyForGenericRequest(), GetContext()); + getNodeIdRequest->ExecuteBatch(); for (size_t i = 0; i != paths->size(); ++i) { auto& richPath = (*paths)[i]; |