summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorartin-phares <[email protected]>2024-12-04 15:59:48 +0300
committerartin-phares <[email protected]>2024-12-04 16:30:02 +0300
commita00bee1b221bf8d6ac18bc85735777726ccb8afe (patch)
tree054f8ed641b8d9c754068e52782ebfd7a88d82d7
parente1c0e000062c9a491febc86f8c715b9ef689f2f7 (diff)
YT-23221: Pass custom pool to sky share operations
commit_hash:9c80e0f226bc350b5e89988c2f8cf92b65c7d50a
-rw-r--r--yt/cpp/mapreduce/interface/client_method_options.h3
-rw-r--r--yt/cpp/mapreduce/raw_client/raw_requests.cpp8
-rw-r--r--yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp4
3 files changed, 14 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/interface/client_method_options.h b/yt/cpp/mapreduce/interface/client_method_options.h
index 6812719b470..9bfb79753dd 100644
--- a/yt/cpp/mapreduce/interface/client_method_options.h
+++ b/yt/cpp/mapreduce/interface/client_method_options.h
@@ -1484,6 +1484,9 @@ struct TSkyShareTableOptions
/// @brief Allow skynet manager to return fastbone links to skynet. See YT-11437
FLUENT_FIELD_OPTION(bool, EnableFastbone);
+
+ /// @brief Custom pool.
+ FLUENT_FIELD_OPTION(TString, Pool);
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/cpp/mapreduce/raw_client/raw_requests.cpp b/yt/cpp/mapreduce/raw_client/raw_requests.cpp
index 98a8aa07929..0b7bcf2c662 100644
--- a/yt/cpp/mapreduce/raw_client/raw_requests.cpp
+++ b/yt/cpp/mapreduce/raw_client/raw_requests.cpp
@@ -876,7 +876,13 @@ TNode::TListType SkyShareTable(
host = "skynet." + proxyName + ".yt.yandex.net";
}
- header.MergeParameters(SerializeParamsForSkyShareTable(proxyName, context.Config->Prefix, tablePaths, options));
+ TSkyShareTableOptions patchedOptions = options;
+
+ if (context.Config->Pool && !patchedOptions.Pool_) {
+ patchedOptions.Pool(context.Config->Pool);
+ }
+
+ header.MergeParameters(SerializeParamsForSkyShareTable(proxyName, context.Config->Prefix, tablePaths, patchedOptions));
TClientContext skyApiHost({ .ServerName = host, .HttpClient = NHttpClient::CreateDefaultHttpClient() });
TResponseInfo response = {};
diff --git a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp
index cd36cea25ae..8f9e79de777 100644
--- a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp
+++ b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp
@@ -833,6 +833,10 @@ TNode SerializeParamsForSkyShareTable(
result["enable_fastbone"] = *options.EnableFastbone_;
}
+ if (options.Pool_) {
+ result["pool"] = *options.Pool_;
+ }
+
return result;
}