diff options
| author | hiddenpath <[email protected]> | 2024-12-13 15:22:36 +0300 |
|---|---|---|
| committer | hiddenpath <[email protected]> | 2024-12-13 17:04:18 +0300 |
| commit | 09c88b035d29fac5fd49de2fbc3c71e2d2a80754 (patch) | |
| tree | a84b5b2de4dcdf85c3b22b9cac7e984aebb8b68d /yt/cpp/mapreduce/client/prepare_operation.cpp | |
| parent | 615edba542d9394b0eae47ef957ec2257549cfdd (diff) | |
yt/cpp/mapreduce: move Get, TryGet, Exists, MultisetAttributes to THttpRawClient
commit_hash:bd2228f98fa92de408ca850f9bc1608fdf99e7f5
Diffstat (limited to 'yt/cpp/mapreduce/client/prepare_operation.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/prepare_operation.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/yt/cpp/mapreduce/client/prepare_operation.cpp b/yt/cpp/mapreduce/client/prepare_operation.cpp index cd775f53577..f78d15f3e7e 100644 --- a/yt/cpp/mapreduce/client/prepare_operation.cpp +++ b/yt/cpp/mapreduce/client/prepare_operation.cpp @@ -2,6 +2,9 @@ #include <yt/cpp/mapreduce/common/retry_lib.h> +#include <yt/cpp/mapreduce/http/retry_request.h> + +#include <yt/cpp/mapreduce/interface/raw_client.h> #include <yt/cpp/mapreduce/interface/serialize.h> #include <yt/cpp/mapreduce/raw_client/raw_requests.h> @@ -16,10 +19,12 @@ namespace NYT::NDetail { TOperationPreparationContext::TOperationPreparationContext( const TStructuredJobTableList& structuredInputs, const TStructuredJobTableList& structuredOutputs, + const IRawClientPtr& rawClient, const TClientContext& context, const IClientRetryPolicyPtr& retryPolicy, TTransactionId transactionId) - : Context_(context) + : RawClient_(rawClient) + , Context_(context) , RetryPolicy_(retryPolicy) , TransactionId_(transactionId) , InputSchemas_(structuredInputs.size()) @@ -38,10 +43,12 @@ TOperationPreparationContext::TOperationPreparationContext( TOperationPreparationContext::TOperationPreparationContext( TVector<TRichYPath> inputs, TVector<TRichYPath> outputs, + const IRawClientPtr& rawClient, const TClientContext& context, const IClientRetryPolicyPtr& retryPolicy, TTransactionId transactionId) - : Context_(context) + : RawClient_(rawClient) + , Context_(context) , RetryPolicy_(retryPolicy) , TransactionId_(transactionId) , InputSchemas_(inputs.size()) @@ -99,11 +106,11 @@ const TTableSchema& TOperationPreparationContext::GetInputSchema(int index) cons auto& schema = InputSchemas_[index]; if (!InputSchemasLoaded_[index]) { Y_ABORT_UNLESS(Inputs_[index]); - auto schemaNode = NRawClient::Get( + auto schemaNode = RequestWithRetry<TNode>( RetryPolicy_->CreatePolicyForGenericRequest(), - Context_, - TransactionId_, - Inputs_[index]->Path_ + "/@schema"); + [this, &index] (TMutationId& mutationId) { + return RawClient_->Get(mutationId, TransactionId_, Inputs_[index]->Path_ + "/@schema"); + }); Deserialize(schema, schemaNode); } return schema; |
