aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <uzhas@ydb.tech>2022-09-19 20:10:32 +0300
committeruzhas <uzhas@ydb.tech>2022-09-19 20:10:32 +0300
commit6e1198e17c1c0d756f00a601a19bd2caff25f8f6 (patch)
tree4352b72076dc317cb8af70399baf3b4266f4c733
parentde2eba147249d6ba206e83c300844d2e8de91419 (diff)
downloadydb-6e1198e17c1c0d756f00a601a19bd2caff25f8f6.tar.gz
fq public HTTP API lib, link with driver, init, part4
-rw-r--r--ydb/core/driver_lib/run/CMakeLists.txt1
-rw-r--r--ydb/core/driver_lib/run/config_parser.cpp5
-rw-r--r--ydb/core/driver_lib/run/kikimr_services_initializers.cpp6
3 files changed, 12 insertions, 0 deletions
diff --git a/ydb/core/driver_lib/run/CMakeLists.txt b/ydb/core/driver_lib/run/CMakeLists.txt
index c2f341ef96..e4bdb347da 100644
--- a/ydb/core/driver_lib/run/CMakeLists.txt
+++ b/ydb/core/driver_lib/run/CMakeLists.txt
@@ -73,6 +73,7 @@ target_link_libraries(run PUBLIC
ydb-core-node_whiteboard
ydb-core-persqueue
ydb-core-protos
+ ydb-core-public_http
ydb-core-quoter
ydb-core-scheme
ydb-core-scheme_types
diff --git a/ydb/core/driver_lib/run/config_parser.cpp b/ydb/core/driver_lib/run/config_parser.cpp
index 865f975bef..5d1d1a1388 100644
--- a/ydb/core/driver_lib/run/config_parser.cpp
+++ b/ydb/core/driver_lib/run/config_parser.cpp
@@ -77,6 +77,7 @@ void TRunCommandConfigParser::SetupLastGetOptForConfigFiles(NLastGetopt::TOpts&
opts.AddLongOption("yql-file", "Yql Analytics config file").OptionalArgument("PATH");
opts.AddLongOption("yq-file", "Yandex Query config file").OptionalArgument("PATH");
opts.AddLongOption("pdisk-key-file", "pdisk encryption key config file").OptionalArgument("PATH");
+ opts.AddLongOption("public-http-file", "Public HTTP config file").OptionalArgument("PATH");
}
void TRunCommandConfigParser::ParseConfigFiles(const NLastGetopt::TOptsParseResult& res) {
@@ -212,6 +213,10 @@ void TRunCommandConfigParser::ParseConfigFiles(const NLastGetopt::TOptsParseResu
if (res.Has("yq-file")) {
Y_VERIFY(ParsePBFromFile(res.Get("yq-file"), Config.AppConfig.MutableYandexQueryConfig()));
}
+
+ if (res.Has("public-http-file")) {
+ Y_VERIFY(ParsePBFromFile(res.Get("public-http-file"), Config.AppConfig.MutablePublicHttpConfig()));
+ }
}
void TRunCommandConfigParser::SetupGlobalOpts(NLastGetopt::TOpts& opts) {
diff --git a/ydb/core/driver_lib/run/kikimr_services_initializers.cpp b/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
index 02d6486873..df06a10842 100644
--- a/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
+++ b/ydb/core/driver_lib/run/kikimr_services_initializers.cpp
@@ -90,6 +90,8 @@
#include <ydb/core/protos/services.pb.h>
#include <ydb/core/protos/console_config.pb.h>
+#include <ydb/core/public_http/http_service.h>
+
#include <ydb/core/quoter/quoter_service.h>
#include <ydb/core/scheme/scheme_type_registry.h>
@@ -2342,6 +2344,10 @@ void TYandexQueryInitializer::InitializeServices(TActorSystemSetup* setup, const
TActorSetupCmd(actor, TMailboxType::HTSwap, appData->UserPoolId)));
};
+ if (Config.HasPublicHttpConfig()) {
+ NKikimr::NPublicHttp::Initialize(setup->LocalServices, *appData, Config.GetPublicHttpConfig());
+ }
+
NYq::Init(
protoConfig,
NodeId,