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/operation_preparer.cpp | |
| parent | 8afd0e6dc9d41134a0cccfd6b6c5fe843efd80fb (diff) | |
yt/cpp/mapreduce: move Create to THttpRawClient
commit_hash:9ca8428c322034064576bb56f74e704425ce7de9
Diffstat (limited to 'yt/cpp/mapreduce/client/operation_preparer.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/operation_preparer.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/yt/cpp/mapreduce/client/operation_preparer.cpp b/yt/cpp/mapreduce/client/operation_preparer.cpp index eb7264425cf..b5263420f02 100644 --- a/yt/cpp/mapreduce/client/operation_preparer.cpp +++ b/yt/cpp/mapreduce/client/operation_preparer.cpp @@ -490,15 +490,18 @@ TYPath TJobPreparer::GetCachePath() const void TJobPreparer::CreateStorage() const { - Create( + RequestWithRetry<void>( OperationPreparer_.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - OperationPreparer_.GetContext(), - Options_.FileStorageTransactionId_, - GetCachePath(), - NT_MAP, - TCreateOptions() - .IgnoreExisting(true) - .Recursive(true)); + [this] (TMutationId& mutationId) { + RawClient_->Create( + mutationId, + Options_.FileStorageTransactionId_, + GetCachePath(), + NT_MAP, + TCreateOptions() + .IgnoreExisting(true) + .Recursive(true)); + }); } int TJobPreparer::GetFileCacheReplicationFactor() const @@ -517,17 +520,19 @@ void TJobPreparer::CreateFileInCypress(const TString& path) const attributes["expiration_timeout"] = Options_.FileExpirationTimeout_->MilliSeconds(); } - Create( + RequestWithRetry<void>( OperationPreparer_.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - OperationPreparer_.GetContext(), - Options_.FileStorageTransactionId_, - path, - NT_FILE, - TCreateOptions() - .IgnoreExisting(true) - .Recursive(true) - .Attributes(attributes) - ); + [this, &path, &attributes] (TMutationId& mutationId) { + RawClient_->Create( + mutationId, + Options_.FileStorageTransactionId_, + path, + NT_FILE, + TCreateOptions() + .IgnoreExisting(true) + .Recursive(true) + .Attributes(attributes)); + }); } TString TJobPreparer::PutFileToCypressCache( |
