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.cpp | |
| parent | 8afd0e6dc9d41134a0cccfd6b6c5fe843efd80fb (diff) | |
yt/cpp/mapreduce: move Create to THttpRawClient
commit_hash:9ca8428c322034064576bb56f74e704425ce7de9
Diffstat (limited to 'yt/cpp/mapreduce/client/operation.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/operation.cpp | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index 5bb67e3059f..0feaa016ed3 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -973,26 +973,32 @@ template <typename TSpec> void CreateDebugOutputTables(const TSpec& spec, const TOperationPreparer& preparer) { if (spec.StderrTablePath_.Defined()) { - NYT::NDetail::Create( + RequestWithRetry<void>( preparer.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - preparer.GetContext(), - TTransactionId(), - *spec.StderrTablePath_, - NT_TABLE, - TCreateOptions() - .IgnoreExisting(true) - .Recursive(true)); + [&spec, &preparer] (TMutationId& mutationId) { + preparer.GetClient()->GetRawClient()->Create( + mutationId, + TTransactionId(), + *spec.StderrTablePath_, + NT_TABLE, + TCreateOptions() + .IgnoreExisting(true) + .Recursive(true)); + }); } if (spec.CoreTablePath_.Defined()) { - NYT::NDetail::Create( + RequestWithRetry<void>( preparer.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - preparer.GetContext(), - TTransactionId(), - *spec.CoreTablePath_, - NT_TABLE, - TCreateOptions() - .IgnoreExisting(true) - .Recursive(true)); + [&spec, &preparer] (TMutationId& mutationId) { + preparer.GetClient()->GetRawClient()->Create( + mutationId, + TTransactionId(), + *spec.CoreTablePath_, + NT_TABLE, + TCreateOptions() + .IgnoreExisting(true) + .Recursive(true)); + }); } } @@ -1003,12 +1009,18 @@ void CreateOutputTable( Y_ENSURE(path.Path_, "Output table is not set"); if (!path.Create_.Defined()) { // If `create` attribute is defined - Create( + RequestWithRetry<void>( preparer.GetClientRetryPolicy()->CreatePolicyForGenericRequest(), - preparer.GetContext(), preparer.GetTransactionId(), path.Path_, NT_TABLE, - TCreateOptions() - .IgnoreExisting(true) - .Recursive(true)); + [&preparer, &path] (TMutationId& mutationId) { + preparer.GetClient()->GetRawClient()->Create( + mutationId, + preparer.GetTransactionId(), + path.Path_, + NT_TABLE, + TCreateOptions() + .IgnoreExisting(true) + .Recursive(true)); + }); } } |
