aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorGleb <jasminetealover7@gmail.com>2025-01-19 23:18:43 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-01-19 23:39:06 +0300
commita41194e88ffbf3ce26acc3c589d6075f3f157740 (patch)
treeb04c725a453008afb10a7db45d85b8d715b2b472 /yt
parentc993a8076ebfaebb02de8864e292ab95a2fc9c53 (diff)
downloadydb-a41194e88ffbf3ce26acc3c589d6075f3f157740.tar.gz
Add docker image option in operaion spec in cpp sdk
* Changelog entry Type: fix Component: cpp-sdk Add `docker image` option into cpp sdk. --- Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/1035 commit_hash:2a13f1bcfc21dc3b500100bca3fdfef04e96abf4
Diffstat (limited to 'yt')
-rw-r--r--yt/cpp/mapreduce/client/operation.cpp3
-rw-r--r--yt/cpp/mapreduce/interface/operation.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp
index eefb4a5fcf..ccad6c2065 100644
--- a/yt/cpp/mapreduce/client/operation.cpp
+++ b/yt/cpp/mapreduce/client/operation.cpp
@@ -704,6 +704,9 @@ void BuildUserJobFluently(
.DoIf(!preparer.GetLayers().empty(), [&] (TFluentMap fluentMap) {
fluentMap.Item("layer_paths").List(preparer.GetLayers());
})
+ .DoIf(userJobSpec.DockerImage_.Defined(), [&] (TFluentMap fluentMap) {
+ fluentMap.Item("docker_image").Value(*userJobSpec.DockerImage_);
+ })
.Item("command").Value(preparer.GetCommand())
.Item("class_name").Value(preparer.GetClassName())
.DoIf(!userJobSpec.Environment_.empty(), [&] (TFluentMap fluentMap) {
diff --git a/yt/cpp/mapreduce/interface/operation.h b/yt/cpp/mapreduce/interface/operation.h
index a87ddc30b4..f541ad2aeb 100644
--- a/yt/cpp/mapreduce/interface/operation.h
+++ b/yt/cpp/mapreduce/interface/operation.h
@@ -764,6 +764,9 @@ struct TUserJobSpec
/// @brief Porto layers to use in the job. Layers are listed from top to bottom.
FLUENT_VECTOR_FIELD(TYPath, Layer);
+ /// @brief Docker image to use in the job.
+ FLUENT_FIELD_OPTION(TString, DockerImage);
+
///
/// @brief MemoryLimit specifies how much memory job process can use.
///