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/prepare_operation.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/prepare_operation.cpp')
-rw-r--r-- | yt/cpp/mapreduce/client/prepare_operation.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/yt/cpp/mapreduce/client/prepare_operation.cpp b/yt/cpp/mapreduce/client/prepare_operation.cpp index 83695ef1e8..31574d7e0e 100644 --- a/yt/cpp/mapreduce/client/prepare_operation.cpp +++ b/yt/cpp/mapreduce/client/prepare_operation.cpp @@ -20,11 +20,9 @@ TOperationPreparationContext::TOperationPreparationContext( const TStructuredJobTableList& structuredInputs, const TStructuredJobTableList& structuredOutputs, const IRawClientPtr& rawClient, - const TClientContext& context, const IClientRetryPolicyPtr& retryPolicy, TTransactionId transactionId) : RawClient_(rawClient) - , Context_(context) , RetryPolicy_(retryPolicy) , TransactionId_(transactionId) , InputSchemas_(structuredInputs.size()) @@ -44,11 +42,9 @@ TOperationPreparationContext::TOperationPreparationContext( TVector<TRichYPath> inputs, TVector<TRichYPath> outputs, const IRawClientPtr& rawClient, - const TClientContext& context, const IClientRetryPolicyPtr& retryPolicy, TTransactionId transactionId) : RawClient_(rawClient) - , Context_(context) , RetryPolicy_(retryPolicy) , TransactionId_(transactionId) , InputSchemas_(inputs.size()) @@ -77,17 +73,17 @@ int TOperationPreparationContext::GetOutputCount() const const TVector<TTableSchema>& TOperationPreparationContext::GetInputSchemas() const { TVector<::NThreading::TFuture<TNode>> schemaFutures; - NRawClient::THttpRawBatchRequest batch(Context_.Config); + auto batch = RawClient_->CreateRawBatchRequest(); for (int tableIndex = 0; tableIndex < static_cast<int>(InputSchemas_.size()); ++tableIndex) { if (InputSchemasLoaded_[tableIndex]) { schemaFutures.emplace_back(); continue; } Y_ABORT_UNLESS(Inputs_[tableIndex]); - schemaFutures.push_back(batch.Get(TransactionId_, Inputs_[tableIndex]->Path_ + "/@schema", TGetOptions{})); + schemaFutures.push_back(batch->Get(TransactionId_, Inputs_[tableIndex]->Path_ + "/@schema", TGetOptions{})); } - batch.ExecuteBatch(RetryPolicy_->CreatePolicyForGenericRequest(), Context_); + batch->ExecuteBatch(); for (int tableIndex = 0; tableIndex < static_cast<int>(InputSchemas_.size()); ++tableIndex) { if (schemaFutures[tableIndex].Initialized()) { |