diff options
| author | apachee <[email protected]> | 2024-05-24 20:47:38 +0300 |
|---|---|---|
| committer | apachee <[email protected]> | 2024-05-24 20:58:06 +0300 |
| commit | 3e42aa91c70358fdd3ec39d0ac23072fc230b209 (patch) | |
| tree | 422612a54143006d874a3997b1ef10efe34da552 /yt/cpp/mapreduce/client/operation_preparer.cpp | |
| parent | b45547676013a5d43cd0072a85643326e686b6fc (diff) | |
YT-21308: Add redirect_stdout_to_stderr flag for C++ client
Adds redirect_stdout_to_stderr spec option for operations that allows writing to stdout as if it was stderr.
6a8ac5f21955a79848d86f72715628c7b8bb65c4
Diffstat (limited to 'yt/cpp/mapreduce/client/operation_preparer.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/operation_preparer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/client/operation_preparer.cpp b/yt/cpp/mapreduce/client/operation_preparer.cpp index ec822e607e4..181d8def037 100644 --- a/yt/cpp/mapreduce/client/operation_preparer.cpp +++ b/yt/cpp/mapreduce/client/operation_preparer.cpp @@ -419,6 +419,7 @@ TJobPreparer::TJobPreparer( } if (auto commandJob = dynamic_cast<const ICommandJob*>(&job)) { + IsCommandJob_ = true; ClassName_ = TJobFactory::Get()->GetJobName(&job); Command_ = commandJob->GetCommand(); } else { @@ -465,6 +466,11 @@ ui64 TJobPreparer::GetTotalFileSize() const return TotalFileSize_; } +bool TJobPreparer::ShouldRedirectStdoutToStderr() const +{ + return !IsCommandJob_ && OperationPreparer_.GetContext().Config->RedirectStdoutToStderr; +} + TString TJobPreparer::GetFileStorage() const { return Options_.FileStorage_ ? |
